• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

JAXP questions

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is JAXP just Java implementation of w3c's DOM
and SAX spec? Are there any more APIs added
for easy use that are similar to JDOM or DOM4J?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The intent of JAXP is to make it easy for the programmer to create a DOM or SAX parser in a way that is independent of the actual parser used. They call it a "pluggable" architecture. This is a big improvement IMHO.
The JAXP package does provide the w3c DOM and the SAX (NOT a W3C standard by the way) API implementations.
The JAXP 1.2 release is supposed to be compliant with XML 1.0, 2nd Ed, DOM level 2 core recommendations, XML Namespaces, SAX 2.0, SAX2 Extensions version 1.0, and (whew) XSLT 1.0.
My! things have gotten complicated in the XML world!
Bill
 
Elizabeth King
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Bill.
But the APIs from DOM and SAX spce are not quite
fix to Java because they written for all languages (including VB, C/C++, ...). Many people
think it is not easy to use compared to JDOM and
DOM4J that are APIs designed only for Java.
BTW, who maintains the spce of SAX?
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While it is true that the DOM and SAX specs are not language dependent, much of the early work was done in Java. Not surprising since the originators were working with Java.
It certainly is true that manipulating the org.w3c.dom objects is a bit of a pain but it is feasible. The JDOM project is designed to be a little closer to typical Java practice.
I am finding the JAXB approach to be pretty powerful - this is an API for creating Java classes that know how to create themselves from an XML document.
http://java.sun.com/xml/jaxb/ <- XML binding project
I hope to be starting a new book project on Sun's "XML Pack" grouping of XML related APIs, see:
http://java.sun.com/xml/javaxmlpack.html
which should eventually include JAXB.
The SAX Home page for the SAX specification
Bill
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To continue my line of raising points of tangential interest , this nice article quotes XML-DEV forum who said "less experienced programmers overusing DOM, and no one seemed to represent the contrary position, that of less experienced programmers overusing SAX"
Why is SAX difficult for a typical programmer:
"A lot of programmers are not really used to event-based programming", and more generally, to "conceptualizing the design of a component as a state-machine."
So it's not only (and maybe even not so much) that DOM and SAX are language independent (by the way, if I am not mistaken, SAX was born as a Java API), they are conceptually difficult.
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic