Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
In just a few years, XML's importance to Java developers has grown by leaps and bounds, especially with Web services on the scene. XML, however, is an evolving technology with numerous subtechnologies emerging to solve common problems. With that in mind, how can a Java developer hope to keep up? This glossary of important XML acronyms will help you dip your feet into the XML pond. I assume some XML knowledge, such as that you understand attributes and elements and know how an XML document looks. To further aid your knowledge, for each technology introduced here, I've included a list of related Websites in Resources.
As for structure, I've split the acronyms into four topical sections:
Within each section, rather than a mere alphabetical list, I've listed the terms in order of importance or relevance to other terms within the section. For quick links to specific terms, use the following alphabetical list:
By "Develop with XML," I mean writing Java code. You'd use each of the technologies below, all used by typing
import ...;, to read or write XML documents. I've started with the most important, although certainly not the most interesting or even
DOM (Document Object Model) is the standard in-memory XML representation. DOM proves flexible in that you can access any document bits whenever you want, but it can be memory hungry, so developers commonly use it to build client applications where memory is not an issue. DOM suffers from being old, language-neutral (so it is a lowest common denominator solution), and works with ill-formed HTML documents—all of which add up to a fairly unfriendly API. Many developers upgrade to JDOM or DOM4J.
SAX (Simple API for XML) differs from DOM in that it is event-driven: the document flashes before your eyes while the parser notifies you of elements and attributes. You pick out the bits you want as it goes by. SAX is lightweight and simple, but working out your location in a document can be challenging. Developers generally use SAX in server applications where memory can be tight.
JAXP (Java API for XML Parsing) is not really a technology separate from DOM or SAX, but simply an extension to both that makes them easier to use in Java. Both DOM and SAX are language-neutral, so neither answers questions like, "How do we create a parser." JAXP answers the creation question and is a standard API for XSLT (Extensible Stylesheet Language Transformations) (see below).
To those struggling with DOM, JDOM will seem like a breath of fresh air. JDOM fixes some of DOM's more arcane areas. For example,
unlike with DOM, in JDOM elements and attributes are objects, so you can call
new Element("name"); and so on. JDOM uses Java collections and helps you write files, another area where DOM falls short. JDOM is being standardized
under JSR 102 (Java Specification Request), which indicates Sun Microsystes' conviction that JDOM is a good solution.