Reading malformed XML

S

Steve Jones

Hi,

I need to parse some XML documents on a "best efforts" basis.

I'm not interested in validating the xml. I just need to handle syntax
errors, missing brackets, missing quotes etc, gracefully.

Any ideas?

Thanks, Steve.
 
S

Simon Shearn

Steve Jones said:
Hi,

I need to parse some XML documents on a "best efforts" basis.

I'm not interested in validating the xml. I just need to handle syntax
errors, missing brackets, missing quotes etc, gracefully.

Any ideas?

Thanks, Steve.
Hello -

You could try the javax.swing.text.html.HTMLEditorKit.ParserCallback class.
This is a SAX-style
parser for HTML that can cope with most kinds of malformedness. I haven't
tried giving it malformed
XML to process, but I would expect it to work.

Regards,

Simon
 

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
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top