Xml parser validating vs non validating advantages
I suppose the two main approaches are DOM and SAX parsers.
For example, both the Tobin and STG parsers can optionally be made namespace-aware if your application requires it.In the grand tradition of Perlians throughout history, you will of course use an existing parser -- say, XML:: Parser -- rather than writing your own.(In this case, you'll find that XML:: Parser is built on the same expat, written in C, that's at the heart of the Mozilla browser.) Or maybe you're using the Oracle 8 database management system to read in and emit XML from its relational tables -- why bother even looking at some parser other than the one that comes with Oracle, and risking potential incompatibilities?If the application you're working on is end-to-end Microsoft-specific, there's no practical advantage (all other things being equal) to considering a parser other than the one built into One final thing to bear in mind when you embark on a search for the "best parser," whatever that means for you: You'll need to limit your search very quickly or go crazy.Back in 1998, within a few months of the XML 1.0 Recommendation's release, one observer reported on XML-DEV that he'd found over 200 parsers (after hitting 200, he gave up counting).If you're editing XML documents by hand rather than in a GUI-based editor, you need to check them for "correctness" before putting them to use.
There are two degrees of "correctness" in the XML world: well-formedness and validity.
Validating parsers perform more rigorous checks, such as making sure the document conforms to the rules laid out by its document type definition (DTD).
Validating parsers also can use information from the DTD to provide extra capabilities, such as entity substitution and attribute defaulting.
With such an avalanche of queries, you'd think our priority would be to answer as many as possible.
Let's start with one of the most basic facts about using parsers: Unless you happen to be developing XML-processing software, you can pretty much forget about this question. But it's not really a question to concern yourself with if you're just interested in browsing XML, editing it, or creating style sheets.
It looms larger, of course, as the documents go up in size (and as you need more validating-type features).