possible to ignore xml errors?

J

Joe Stateson

I am putting together a treeview from a web service (python script on a unix
system) that generates the following xml code

<toi Value="datetime.datetime(2007, 4, 2, 17, 23, 49, tzinfo=<UTC>)"/>

I cannot bind the file into the treeview because the tzinfo=<UTC> causes
problems. I just discovered this when I tried to display the xml file in
IE. Firefox displays it just fine (no error)

Anyway, is there something I can set in my page to have it ignore an error
like that above? I cannot always get the script corrected on the unix
system.

...TIA..
 
B

bruce barker

the .net xml parses have no recovery from errors, that would allow them
to continue parsing and they are rather strict.

you can catch that the parse failed, but no dom is returned. you page
could test the xml first, and have a fallback xml string.

you could write a simple parser to claen up the xml to make it valid for
the common errors.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top