Category: XML

JDom Xml Tutorials

Update XML Document with JDOM2

In this tutorial we show how to update an XML Document using JDOM. We can modify the XML Document after we load it into memory. We show you how to do the following updates: Edit...
JDom Xml Tutorials

Query XML Document with XPath and JDOM

We can use XPath to query an XML Document, searching for specific nodes using a query syntax. This tutorial shows how to Query an XML Document with XPath and JDOM. Maven Dependencies You need to...
JDom Xml Tutorials

Validate XML against XSD Schema using JDOM

An XSD Schema is used to validate an XML document, it describes what elements, attributes, types are allowed and in which order. In the following tutorial we explain how you can validate an XML document...
JDom Xml Tutorials

Validate XML against DTD using JDom

A Document Type Definition (DTD) defines which elements and attributes you can use inside an XML document. Typically this DTD document is specified inside the XML document. In this example we explain haw you can...
JDom Xml Tutorials

Read XML in Java using JDom Parser

JDom is an open source library for manipulating XML documents. It has an easier API then the standard Java JDK libraries. In the following tutorial we explain how you can read an XML file in...
xml tutorials

Generate XSD from Java Classes

In this tutorial we show you how to generate XSD from Java Classes using java binding annotations. Java Classes can be converted into XSD schema and vice versa using the jaxb2-maven-plugin. We can specify which...
xml tutorials

Generate Java Classes From XSD

This example shows you how to generate Java Classes from XSD using jaxb2-maven-plugin. This plugin uses the XJC which is a JAXB Binding compiler tool that can generate Java Classes from XSD. Maven Project Dependencies...
xml tutorials

Get Line Number from XML Validation against XSD Schema

In this example we will grab the Line and column number from the validation exception while validate XML against XSD Schema. We use the javax.xml.validation.Validator to check the XML document against the XSD schema. Be...