in reply to Catch XML error
XML documents have a very strictly defined format. All conforming parsers will throw an exception for the input you describe, because the input is not XML and the "correct" thing to do is to reject the whole input file.
This makes sense when you use XML to transfer data between systems - you generally don't know much about the sending system, and if the input doesn't conform to the specs, the right attitude to take is that the other system has just thrown a bug or the stream has been mangled during transfer.
Again; your input is not XML. Trying to subvert the XML specs is fine by me, but you should not expect any standard XML tools to help you do it, and other developers/spec-writers will probably not understand all the subtleties involved. The full XML spec really is not as easy as you'd think from reading a couple of XML files. If you're diverting from it, you'd better make really sure you know what you're doing.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Catch XML error
by ecuguru (Monk) on Jul 17, 2007 at 19:01 UTC | |
by Joost (Canon) on Jul 18, 2007 at 22:27 UTC |