Comparing XML Documents with Oracle's XDK 10g for Java
Using Oracle's XDK 10g, you can reduce the process of comparing XML documents to a simple set of library calls that let you determine if the documents are the same, see what the differences are, or use the compare information to generate other documents.
by Deepak Vohra
March 22, 2006
s a J2EE developer you might sometimes be interested in comparing a modified XML document with the pre-modified version of that document. Or you might want to compare two XML documents that are both based on the same DTD or XML schema. This article is designed to give you the information you need to answer two questions:
Is one XML document the same as another?
What are the differences between two XML documents?
In this article, I'll show you how to use XDK 10g Production, which provides a mechanism to compare two XML documents and list the differences between them.
Oracle XML Developer's Kit (XDK) 10g is a set of APIs, tools and utilities to help you develop XML applications. XDK 10g is available for Java, C and C ++; however, this article discusses only the Java-compatible version. XDK 10g supports DOM 3.0 and XSLT 2.0 specifications. XDK 10g provides a schema validation API to validate XML documents against an XML schema. You can use the XML Class generator API in XDK 10g to bind XML schema to Java classes, and subsequently marshal and unmarshal XML documents. The XML SQL Utility aids in storing XML documents in a RDBMS database. A supplied XSQL servlet combines XML, SQL, and XSLT to generate an XML document from a SQL query.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!