- JDOM
Infobox_Software
=
caption =
developer =
latest_release_version = 1.1
latest_release_date = 13.11.2007
operating_system =Cross-platform
programming language = Java
genre =XML
license =OpenSource (apache like)
website = http://jdom.orgJDOM is an
open source Java-based document object model forXML that was designed specifically for theJava platform so that it can take advantage of its language features. JDOM integrates withDocument Object Model (DOM) andSimple API for XML (SAX), supportsXPath and XSLT. It uses external parsers to build documents. JDOM was developed by Jason Hunter and Brett McLaughlin starting in March 2000. It has been part of theJava Community Process as JSR 102, though that effort has since been abandoned. The name JDOM is apseudo-acronym for Java Document Object Model.Examples
Suppose the file "foo.xml" contains this XML document:
One can parse the XML file into a tree of Java objects with JDOM, like so:
In case you don't want to create the document object from any file or any input stream, you can create the document object against the element.
As a converse, one can construct a tree of elements, then generate a XML file from it, like:
External links
* [http://www.jdom.org/ JDOM home page]
* [http://www-128.ibm.com/developerworks/java/library/j-jdom/ Simplify XML Programming with JDOM]
Wikimedia Foundation. 2010.