Yes, you can do with Java. If your need is just selecting the nodes
using the expression you can use the XPathAPI's appropriate methods to
do it. For example, the selectSingleNode( contextNode, expression )
returns the first node from the result node list. XPathAPI is available
with Xalan, I think, (org.apache.xpath.XPathAPI).
-Sheen
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 10:43 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: Is it possible to find a node by his attribute?
Well, but I want to do it with Java, is possible yet?
-----Mensaje original-----
De: Sebastien SACARD [mailto:[EMAIL PROTECTED]
Enviado el: mi�rcoles, 12 de junio de 2002 10:30
Para: [EMAIL PROTECTED]
Asunto: Re: Is it possible to find a node by his attribute?
You can use XPath to retrieve any node by its attribute value :
"//[EMAIL PROTECTED]'4']", if you are not familiar to Xpath, try this :
http://zvon.org/xxl/XPathTutorial/General/examples.html.
Marcial Atienzar wrote:
Hello,
I've this structure:
<root>
<method number="1">
<option>hello</option>
<option>bye</option>
</method>
<method number="2">
<option>what's the matter</option>
<option>spydi</option>
</method>
.
.
.
</root>
And I want to find a node method whose number was 4, for example.
And I don't want to go throw all the tree by a nodelist. Is it possible?
Thanks,
Marcial
--
#############################################################
S�bastien Sacard
Kelkoo.com - R&D team
Phone: +(33) 4 76 29 73 51
Email: [EMAIL PROTECTED]
Aim : KelkooXIII
#############################################################
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For
additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]