Monday, July 6, 2009

Writing DOM to XML File on Disk

Just wrote a small program to write a DOM to an XML on the disk using Xerces. The sample class can be seen here. If you are using maven, don't forget to add xerces dependencies:
        <dependency>
<groupId>xerces</groupId>
<artifactId>xmlParserAPIs</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>apache-xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
</dependency>

For more details, refer Processing XML with Java by Elliotte Rusty Harold

No comments: