You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ni...@sercel.fr on 2003/02/19 09:18:52 UTC
Réf. : Re: Réf. : RE: Réf. : XMLSchema parser?
I didn't find anything in Xerces that allows you to write complex X-Path requests in the DOM API. In dom4j for example, I use to
write such requests (from a DOM node n) :
n.selectSingleNode("descendant::xsd:attribute[@ref='xxx']/@fixed").
Xalan allows you to process XSL stylesheets on XML documents and I don't want to write an XSL stylesheet for each request.
"Jesus M. Salvo
Jr." Pour : xerces-j-user@xml.apache.org
<jesus.salvo@mi cc :
gasia.com> Objet : Re: Réf. : RE: Réf. : XML Schema parser?
02/19/2003
05:43 AM
Veuillez
répondre à
xerces-j-user
Xalan already does XPath. How is this different from DOM4J?
Nicolas.GOLOUBENKO@sercel.fr wrote:
>If you need a parser library that implements (in java only !) X-Path, you can try dom4j (very simple to use).
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Réf. : Re: Réf. : RE: Réf. : XML Schema parser?
Posted by "Jesus M. Salvo Jr." <je...@migasia.com>.
Nicolas.GOLOUBENKO@sercel.fr wrote:
>I didn't find anything in Xerces that allows you to write complex X-Path requests in the DOM API.
>
I said Xalan ... not Xerces.
For me, getting elements via XPath is so much easier rather. For
example, to retrieve the href attribute of the Content element which is
a child of a SubmitReq element ... both of which have a namespace prefix
of "mm7", I use the following XPath expression:
//mm7:SubmitReq/mm7:Content/@href
The document itself does not need to necessarily have the same namespace
prefix in the XPath expression. You specify how the namespace prefix in
your XPath expression maps to a namespace URI via a PrefixResolver.
>In dom4j for example, I use to
>write such requests (from a DOM node n) :
>n.selectSingleNode("descendant::xsd:attribute[@ref='xxx']/@fixed").
>Xalan allows you to process XSL stylesheets on XML documents and I don't want to write an XSL stylesheet for each request.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Réf. : Re: Réf. : RE: Réf. : XML Schema parser?
Posted by Joseph Kesselman <ke...@us.ibm.com>.
>I didn't find anything in Xerces that allows you to write complex
>X-Path requests in the DOM API.
This is being standardized as part of DOM Level 3. I believe current
versions of Xerces have a prototype implementation of those calls.
Meanwhile, Xalan certainly supports individual XPath queries as well as
running complete stylesheets. See the documentation, especially the
XPathAPI and XPathCachedAPI classes. We aren't maximally efficient when
running against a DOM; there is some work now in progress which we hope
will improve data model efficiency in general and DOM support in
particular.
______________________________________
Joe Kesselman / IBM Research
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org