Comparing the Java and C++ Implementations

In the previous chapter we talked about the differences in DOM support, error handling, and native language features. We again see differences between the two implementations, and a common theme emerges. While C++ with MSXML is a bit more complex in some areas due to setting up the COM environment and checking for COM errors, the code that actually does the DOM-related functions is much more concise. The load and save operations are single calls with no setup. Compare this with the corresponding operations in JAXP and Xerces. Creating a Document requires a DocumentBuilderFactory, a DocumentBuilder, and finally a call to the create or parse method. Saving a Document using the XML Serializer is even more ...

Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.