i do not know if you still have the problem: your people are pasting text from word and you save it into xml. the xml writer of RB is not strict, so it does not remove illegal XML characters (low control characters), but the XML parser is strict and cannot read it. i had a hard time with subitler on this. check XML spec for which control characters are illegal and filter them both on writing and before parsing.

matthias

On 5 avr. 06, at 19:27, Marc Zeedar wrote:


Hi gang!

I'm getting into XML and I've run into a puzzle. My app saves and loads
XML files, but suddenly I'm getting a few beta testers with files that
won't open. These files were created by my app. I get an XMLException
right at the "loadXML" parse command with an error of "XML parser error 3:
not well-formed (invalid token)."

What I can't figure out is where the error is lcoated. The line number
shows an innocuous line in the XML and when I delete that "bad" XML node it just gives me an error at a different line. If I delete enough stuff
eventually the file will open, but there doesn't seem to be a rhyme or
reason to it.

Since the XML in question is generated by my app, the actual formation of the tags is standard; since some files work and some don't, it can't be in how I'm nesting the tags. The only thing I can think of is that there's something in the user's *content* (data being saved) that's causing the
error, but the data appears to be pretty simple text.

Any ideas how to debug this? I'm a bit at a loss since it just errors when I pass the XML to the parser, with no way of figuring out what, exactly,
is causing the problem.

Oh, and I'm using RB5.5.5 -- I haven't yet converted my app to RB2005/6 yet. Don't know if that makes a difference, but if it's a bug in RB's XML
parser I suppose it might be fixed in a more recent release.


--
Marc Zeedar
Publisher
REALbasic Developer Magazine
http://www.rbdeveloper.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to