There is no alternative but to start again, smarting but smarter, and build a redesigned version in which these problems are solved.…
Hence Still, it is much easier to change parsers than APIs.
In order to avoid the difficulties inherent in parsing raw XML input, almost all programs that need to process XML documents rely on an XML parser to actually read the document.
The parser is a software library (in Java it’s a class) that reads the XML document and checks it for well-formedness.
DOM, the Document Object Model, is a fairly complex API that models an XML document as a tree. It can both parse existing XML documents and create new ones.
However, SAX programs can be harder to design and code because you normally need to develop your own data structures to hold the content from the document.Finally each specific parser generally has a native API that it exposes below the level of the standard APIs.For instance, the Xerces parser has the Xerces Native Interface (XNI).Java developers already had adequate Unicode support, however; and thus Java parsers were a lot faster out the gate.Nonetheless, it still probably isn’t possible to write a fully conformant XML parser in a weekend, even in Java. There are several dozen XML parsers available under a variety of licenses that you can use.