You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jan <vi...@gmx.de> on 2001/10/02 20:13:48 UTC
How to get a NodeList via a XPath like String?
Is there a way to get a NodeList containing all nodes of a specified Document that match (XPath) to an expression string like
"/mux/content//sidebox" or "/mux/content[@lang = 'us-en']//sidebox[1]" etc.?
Thanks,
Jan.
Re: How to get a NodeList via a XPath like String?
Posted by Adrian Geissel <ag...@zenark.com>.
Jan,
Are you looking for something like
"/mux/content[@lang='us-en' or not(@lang)]//sidebox[1]"
Adrian
----- Original Message -----
From: Jan
To: cocoon-users@xml.apache.org
Sent: Tuesday, October 02, 2001 7:13 PM
Subject: How to get a NodeList via a XPath like String?
Is there a way to get a NodeList containing all nodes of a specified Document that match (XPath) to an expression string like
"/mux/content//sidebox" or "/mux/content[@lang = 'us-en']//sidebox[1]" etc.?
Thanks,
Jan.
Re: How to get a NodeList via a XPath like String?
Posted by Andre Juffer <aj...@sun3.oulu.fi>.
Jan wrote:
> Is there a way to get a NodeList containing all nodes of a specified
> Document that match (XPath) to an expression string like
>
> "/mux/content//sidebox" or "/mux/content[@lang = 'us-en']//sidebox[1]" etc.?
You may want to have a look at the org.apache.xpath package that is
included with Xalan. Check out the XpathAPI class. Xalan is also
included with cocoon2.
>
>
>
> Thanks,
>
> Jan.
--
Andre H. Juffer | Phone: +358-8-553 1683
The Biocenter and | Fax: +358-8-553-1141
the Dep. of Biochemistry | Email: Andre.Juffer@oulu.fi
University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>