Java: A platform for platforms
Sun's reorg may seem promising to shareholders but it's also a scramble for position. The question now is whether Sun can, or wants to, maintain its hold on Java technology. Especially with enterprise leaders like SpringSource and RedHat investing heavily in Java's future as a platform for platforms

Also see:

Discuss: Tim Bray on 'What Sun Should Do'

Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

XML glossary

XML acronyms for Java developers

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

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:

  • Develop with XML
  • XML building blocks
  • Communicate with XML
  • Display XML


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:

Index



Develop with XML

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 useful.

DOM

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.

Back to index

SAX

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.

Back to index

JAXP

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).

Back to index

JDOM

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.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources