xmlerr, can't parse xml, Extra content at the end of the document

kee nethery kee at kagi.com
Mon Mar 23 17:29:52 EDT 2015


Are you confusing data with labels?
kee


Normally you’d do something like this where the data is not part of the labels (the indents are just for readability):

<?xml version="1.0" encoding="UTF-8”?>
<myLiveCodeXml>
	<user id=2>
		<username>Tiemo Hollmann</username>
		<email>toolbook at kestner.de</email>
	</user>
	<user id=6>
		<username>Kee Nethery</username>
		<email>kee at ieee.org</email>
	</user>
</myLiveCodeXml>




> On Mar 23, 2015, at 3:11 AM, Tiemo Hollmann TB <toolbook at kestner.de> wrote:
> 
> Hello,
> 
> I am using since some time successfully XML files with LC 6.5.2. Now I
> wanted to allow the user to enter spaces in their names like “Tiemo
> Hollmann”, which I am using as tag names in my xml file. Because spaces are
> not allowed characters in XML tag name I replace the spaces by “$” before
> creating and saving the xml file and vice versa after reading the xml file.
> When trying to read such a xml file I get the error: “xmlerr, can't parse
> xml, Extra content at the end of the document” though “$” is a valid
> character for tag names in the xml spec. I tried the same with other chars
> like “§” or “%” with the same error. The xml file looks like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <My$Name>
> 
> ...
> 
> </My$Name>
> 
> The LC line is: put revXMLCreateTreeFromFile(tXMLFile,true,true,true)  into
> tID
> 
> When deleting the “$” signs from the tag names, I can import the file
> without error. I also tried it without encoding="UTF-8", but with the same
> error. There is no trailing char after the last tag name.
> 
> Any idea what I am doing wrong?
> 
> Thanks
> 
> Tiemo
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list