revXMLib bugs

Alain Farmer alain_farmer at yahoo.com
Wed Jul 30 00:34:50 EDT 2014


Hello,

I am using LC-6.6.2 on Debian.

I have been experimenting with revXMLib lately.

One of my objectives is to process 15000 xml-files, 3 different kinds.

Btw I am migrating a huge Drupal-site (exported to XML) to LiveCode.

First the encoding challenge had to be vaulted:

a) xml-lib won't load the xml if the encoding is not the correct one.

b) if set parseBadData to true, it will load, but special-chars are incorrectly handled (gibberish).

c) if load fails because of one encoding (UTF-8), then I replace it with another (iso-8859-1) & try again.

d) even with dynamic encoding-swap, it still requires some processing to transcode certain chars.

e) this works adequately now, but I pray that future versions of LC will make this easier & seamless.

First bug:

1. I load a tree, pass the appropriate id to revXML cmds & functions, fine so-far.

2. with revXMLChildContents set to root node, and includePathDetails set to "full", I get all children (xpaths) + their values.

3. but if I use revXMLNodeContents, pass one of the xpaths, the value I get may contain gibberish instead of special-chars.

4. IOW, revXMLChildContents decodes special-chars (é, è, à, etc) correctly, but revXMLNodeContents does not.

5. workaround = use revXMLChildContents, with tab as delim, item 1 is attrName, item 2 is attrValue.

6. can save this tab-delimited table as a .xls file, use Data Grid, load xls table as an array for fetching specific attributes.

Second bug:

1. when I load a second tree, pass id required, the values fetched are the values of the first tree, not the second tree.

2. if I add more trees, each with its own ID, the values fetched are still the values of the first tree only.

3. workaround = use revDeleteAllXMLTrees before creating any tree, to insure that only ONE is loaded at a time.

If this is not the appropriate place for bug reports, I am sorry, and please forward it to the right place. I have already spent an entire frustrating day on this. I have no energy left.

Alain



More information about the use-livecode mailing list