-- not well-formed error

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


General idea of what I am doing: Running a file scan on my hard drive
that is storing the info into an XML file.  Then another perl script I
have wrote is parsing this data and making use of it.

Keep getting this error:
not well-formed (invalid token) at line 1742, column 29, byte 67305 at
ite/lib/XML/ line 187

The line in the XML file is:
<FileName>3 Floppy (A).lnk</FileName>

The issue is obviosuly the 1/2 symbol.  Is there anyway way to get
around this error?  I cannot delete the 1/2 symbol or anything, I need
it exactly the way it is.

Any way to have the parser not validate the XML data or something and
just take it as a literal string?

Re: -- not well-formed error

Just figured it out.

I don't know the XML specs too well so I kind of made up the format the
file scan outputted.

Added this line to the top of the document:
<?xml version="1.0" encoding="ISO-8859-1"?>

And seems to all work.


Re: -- not well-formed error

Is there any encoding that allows & symbols in XML? Without having to
replace to &amp

Re: -- not well-formed error

Rishi Dhupar wrote:
Quoted text here. Click to load it

no: (look at the (T) comment, while
non-normative, Tim Bray should know what he is talking about ;--)


Site Timeline