axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Ruby" <ru...@us.ibm.com>
Subject RE: [AXIS ARCH] - Message Internals
Date Thu, 01 Feb 2001 03:00:18 GMT
Yuhichi Nakamura wrote:
>
> I thought that DOM is a pull parser, and SAX is a push
> parser in this context.  Maybe I am wrong.  Please
> correct me.

DOM conceptually parses the entire file and passes you the result all at
once.

Push and pull are descriptions of different ways that you can be passed an
XML stream one element at a time.  Push means that the parser calls you
when it has something available (like SAX does).  Pull means you call it
when you want the next item.

> Axis engine should be developed on top of existing
> techonoloies, therefore we should not reinvent similar
> things in this project.  At this moment, I feel that
> Xerces is the most appropriate for the parser stuff.

There is merit to this argument.  But I will ask that if you restrict
yourself to W3C interfaces (i.e., DOM or SAX) that you please do not bind
yourself to Xerces specific interfaces.  Instead use JAXP.  A good
introduction to JAXP can be found at
http://www-106.ibm.com/developerworks/library/x-jaxp/?dwzone=java

The reason this is important to me is that until recently, each jakarta and
xml project picked their favorite parser.  It took a lot of convincing but
now Ant and Tomcat and several other projects that had hardcoded the Sun
parser now will accept any JAXP compliant parser (including Xerces).  The
Crimson parser as it is now known is an Apache project and has several
advantages, including smaller size.

The primary change to your code is instead of creating a "new DOMParser",
you call a method on a DocumentBuilderFactory.

Finally, the Xerces teams is starting a Xerces 2 effort.  While the Xerces
specific APIs are subject to change, the JAXP ones are not.

- Sam Ruby


Mime
View raw message