spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / xml / column25

JDOM, The Java DOM

Sr Instructional Designer D2L-Moodle,Clearance
WSI Nationwide, Inc.
US-NJ-Fort Monmouth

Justtechjobs.com Post A Job | Post A Resume
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs


JDOM summary

Handling Attributes in JDOM

In JDOM, each attribute is represented as an Attribute object, which as a string name and a string value, plus a Namespace object (which may be Namespace.NO_NAMESPACE). Convenience methods can convert the attribute value to various types like int or double. JDOM enforces restrictions on attribute names and values. Attributes are stored in a java.util.List in the Element that contains them.

Handling Namespaces

Namespaces are represented by instances of the Namespace class rather than by attributes or raw strings. Always ask for elements and attributes by local names and namespace URIs, never identify an element or attribute by its qualified name, such as <vml:line>. Elements and attributes that are not in any namespace can be asked for by their local name alone.

JDOM limitations

JDOM, like all other current DOM implementations, constructs its documents in memory, so documents that are larger than available memory cannot be parsed. JDOM does not create identical, only equivalent documents when parsing and rewriting XML documents. It does not deal with DTDs as they are not XML documents, although the underlying validating parser uses them, of course. XPath Queries for navigating an XML document are announced for version 1.1.

Conclusion

JDOM is a convenient interface for Java programmers to have XML documents presented in a more Java-like fashion, reusing Java libraries and design patterns. Version beta 5 is out, have a look if you want to quit struggling with the comparatively awkward W3C DOM Java binding.

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint

Produced by Michael Claßen
All Rights Reserved. Legal Notices.

URL: http://www.webreference.com/xml/column25/4.html
Created: Dec 03, 2000
Revised: Dec 03, 2000