Jdom jar file download

Jdom jar file download

jdom jar file download

If you downloaded JDOM jar file, then simply include it to your java project in IDE. If you use IntelliJ IDEA, then follow these steps: File > Project. jdom-b7.jar, jdom/jdom/b7, classes, dependencies, depends on, dependency graph, JAR file, findJAR, serFISH This page shows details for the JAR file. Unzip the downloaded file, and then copy-paste the JDBC driver (the.jar file only​) into the activation.jar; javax-ressource.jar; jdom.jar; log4j-1.2.16.jar; ugc.jar.

JDOM

JDOM is an open-sourceJava-based document object model for XML that was designed specifically for the Java platform so that it can take advantage of its language features. JDOM integrates with Document Object Model (DOM) and Simple API for XML (SAX), supports XPath 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 the Java Community Process as JSR 102, though that effort has since been abandoned.

Examples[edit]

Suppose the file "foo.xml" contains this XML document:

<shopname="shop for geeks"location="Tokyo, Japan"><computername="iBook"price="1200$"/><comic_bookname="Dragon Ball vol 1"price="9$"/><geekyness_of_shopprice="priceless"/></shop>

One can parse the XML file into a tree of Java objects with JDOM, like so:

SAXBuilderbuilder=newSAXBuilder();Documentdoc=builder.build(newFileInputStream("foo.xml"));Elementroot=doc.getRootElement();// root.getName() is "shop"// root.getAttributeValue("name") is "shop for geeks"// root.getAttributeValue("location") is "Tokyo, Japan"// root.getChildren() is a java.util.List object that contains 3 Element objects.

In case you do not want to create the document object from any file or any input stream, you can create the document object against the element.

Elementroot=newElement("shop");// here <shop></shop> is the rootDocumentdoc=newDocument(root);// create a new document with the supplied element as the root

As a converse, one can construct a tree of elements, then generate an XML file from it, as in the following example:

Elementroot=newElement("shop");root.setAttribute("name","shop for geeks");root.setAttribute("location","Tokyo, Japan");Elementitem1=newElement("computer");item1.setAttribute("name","iBook");item1.setAttribute("price","1200$");root.addContent(item1);// perform similar steps for other elementsXMLOutputteroutputter=newXMLOutputter();outputter.output(newDocument(root),newFileOutputStream("foo2.xml"));

External links[edit]

Official website

Источник: https://en.wikipedia.org/wiki/JDOM

Jdom jar file download

1 thoughts to “Jdom jar file download”

Leave a Reply

Your email address will not be published. Required fields are marked *