Réf. : Re: Réf. : Re: Réf. : RE: Réf. : XML Schema parser? 2003-02-20 - By Nicolas.GOLOUBENKO@(protected)
You mean that the Xalan API can be used outside any XSL stylesheet to browse nodes inside an XML tree or to update nodes values/nodes attributes inside an XML tree ? I thought that Xalan was only an XSL stylesheets processing API...
"Jesus M. Salvo Jr." Pour : xerces-j-user@(protected) <jesus.salvo@(protected) cc : gasia.com> Objet : Re: R�f. : Re: R�f. : RE: R�f. : XML Schema parser?
02/19/2003 11:48 PM Veuillez r�pondre � xerces-j-user
Nicolas.GOLOUBENKO@(protected) 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/@(protected)
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[@(protected)='xxx']/@(protected)"). >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@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|