JAST: Java Abstract Syntax Trees can process XML in Java in many different ways. Please navigate to the specific user guide page for the task you wish to perform.
DOM Parsing is where you convert an XML file into a Document Object Model in memory. The DOM-tree is a hierarchical model of the XML document.
XMLReader reads an XML file into a DOM-tree.
XMLWriter writes a DOM-tree out to an XML file.
The nodes of the DOM-tree are Java classes, with obvious names that correspond to the XML element types. These nodes may be searched and updated by Java programs, before saving the tree to file.
SAX Building is where you use a Streaming API for XML to scan a very large XML file, seeking to build a part of this structure. You invoke call-back methods on a Builder that recognises the parts you want.
XMLParser reads an XML file and calls a Builder.
BasicBuilder is the default null-op Builder.
You design your own Builder to recognise specific XML elements, and make it build the desired Java structure in your program.
XPath Querying is where you use an XPath query pattern to search a DOM-tree. The string pattern is analogous to a directory path leading to the matching element, or elements.
XPath compiles a pattern to a set of rules.
XPath's method match() searches the DOM-tree.
JAST supports only the short-form XPath syntax. The results are returned as lists of Content, an abstract kind of XML node.
Java Binding is where you map the elements of an XML file to Java classes of your own design. XML is the serialisation format used by your own Java data structures.
ASTReader maps an XML file to a Java structure.
ASTWriter maps a Java structure to an XML file.
Your own Java classes must observe simple method naming conventions to enable marshalling to and from XML.
DTD Validation is where you check the elements of a DOM-tree using a Document Type Definition. This is a grammar of the expected XML structure, which is compiled into a DTD-tree of grammar rules.
DTDReader reads a DTD file into a DTD-tree.
Any Reader may validate a DOM-tree.
You may have an internal DTD (in the DOM-tree) or an external DTD (a separate file). Validation is enabled by the Reader's setValidation() method.
XSD Validation is where you check the elements of a DOM-tree using an XML Schema Definition. This is an XML schema of the expected XML structure, which is compiled into grammar rules.
XSDReader compiles an XML Schema.
Any Reader may validate a DOM-tree.
The XML Schema is always provided as an external XML file. Validation is enabled by the Reader's setValidation() method.