Expat non validating xml parser
) But maybe for one reason or another you really do need to select a standalone parser. And within the well-formedness category, you may need some additional but optional features which are required only of a validating parser.Do you want the parser to supply an attribute's default value if the document author hasn't done so? In such cases, you can eliminate whole sub-categories of non-validating parsers from consideration.
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.Besides the expected things like being able to parser elements and attributes as well as making sure they are well-formed, a conforming non-validating XML parser should also support the following: The internal DTD subset consist of the DTD declarations that are found in the XML document itself as opposed to the external subset which consists of the declarations placed into separate DTD files and referenced from the XML documents.Here is a sample document that uses most of the above features (download it to test your favorite parser: test.xml): This entry was posted on Monday, May 19th, 2008 at am and is filed under Development, XML.Recently there’s been a bunch of announcements of new XML parsers that claim to be very fast, very small or both.I also see a lot of people get very enthusiastic about using them in their applications.It's like asking, "I want to buy a car and I want to make sure the wheels will stay on. The developer of the browsing application will almost certainly have made the decision for you, and you can probably override it only with difficulty (and perhaps intellectual pain).For instance, Microsoft's Internet Explorer 5.x browsers use a parser built into the file, and the Mozilla browser is built on a parser, written in C, called "expat." Nevertheless, in some cases you do need to select a parser.Once I tell people about these problems with their choice of XML parser, some say they don’t care since nobody uses these features anyway.It is true that most of these features are seldom used.(Here, I'll call these "parsers" even though they're actually Web-based interfaces which sit on top of parsers.) Good ones are: Aside from the well-formedness-vs.-validity and user-interface differences, these syntax-checkers differ in smaller ways.For example, both the Tobin and STG parsers can optionally be made namespace-aware if your application requires it.