OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Which parser to use



I must admit that I've not done a great deal of W3C Schema work myself
(Schematron is more my bag).

Xerces is fully W3C Schema compliant though apparently [1]. Judging
by the documentation page [2] this is controlled through setting
properties on the DOM/SAX parsers. (e.g. on javax.xml.parsers.SAXParser
class).

Cheers,

L.

p.s. JAXP is a collection of APIs (W3C DOM, SAX, TRAX). And yes,
its my preferred way of manipulating XML through Java. The comments
from the Java Community Process vote [3] on JDOM make interesting reading
if you want to position it versus the W3C DOM effort.

[1]. http://www.xmlhack.com/read.php?item=1282
[2]. http://xml.apache.org/xerces-j/schema.html
[3]. http://www.jcp.org/jsr/results/102-1-1.jsp

> -----Original Message-----
> From: Richard Featherstone [mailto:R.Featherstone@uea.ac.uk]
> Sent: 09 July 2001 16:18
> To: Leigh Dodds
> Cc: xml-dev@lists.xml.org
> Subject: RE: Which parser to use
>
>
>
> So JAXP and JDOM and both APIs and JAXP is the API of choice right?  What
> I'm after is the easiest to use for validating XML docs against Schema
> when parsing.  I've been using JAXP but can't find any examples that
> validate against Schema and have been pointed towards JDOM by someone who
> has done just that with it.
>
> On Mon, 9 Jul 2001, Leigh Dodds wrote:
>
> >
> > > -----Original Message-----
> > > From: Richard Featherstone [mailto:R.Featherstone@uea.ac.uk]
> > > Sent: 09 July 2001 15:38
> > > To: xml-dev@lists.xml.org
> > > Subject: Re:Which parser to use
> > [...]
> > > I'm new to working with XML and want to manipulate docs with
> Java.  Which
> > > is the best parser to use JAXP, Xerces, XML4J JDOM or another.
> > [...]
> >
> > Hi Richard,
> >
> > To be clear:
> >
> > XML4J is a parser. Although still actively maintained by IBM, the code
> > now forms part of the Apache Xerces project. Sun followed a similar
> > path and donated their ProjectX parser to Apache as well.
> >
> > JDOM is a Java API for manipulating XML document structures, and
> > is one alternative to the W3C DOM API.
> >
> > JAXP is a Sun specification that basically certifies a several other
> > APIs as 'suitable' for use by Java developers (basically SAX and DOM),
> > as well as including code to mask the differences between working
> > with different parsers. It also include TRAX which is an API for working
> > with XSLT processors.
> >
> > Personally I tend to use Xerces as my parser of preference (not based
> > on any particular reasons, I've just used it for some time without
> > problems),
> > but via the JAXP interfaces so that I can switch parser later
> if I need to.
> >
> > So perhaps the answer you're looking for is: develop your Java code
> > to the JAXP specification and then you've got some leeway to
> alter parsers
> > (and XSLT processors) at your leisure.
> >
> > HtH.
> >
> > L.
> >
> >
> > --
> > Leigh Dodds, Systems Architect       | "Pluralitas non est ponenda
> > http://weblogs.userland.com/eclectic |    sine necessitate"
> > http://www.xml.com/pub/xmldeviant    |     -- William of Ockham
> >
> >
> >
>