Hi Tom,
  XPATH is only applied on document object not on node object as far as my 
knowledge is concerned.
if you want to make it work on the node. create a new document object using.

Document doc = new DocumentImpl();

and import the node from the doc using.

Node tempNode = doc.importNode(node,true);
doc.appendChild(tempNode);

and apply xpath on this "doc" object. It will work perfectly.

regards,
Sridhar

-----Original Message-----
From: tom john [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 27, 2002 11:10 PM
To: [EMAIL PROTECTED]
Subject: Extracting node from DOM Document


Hi,

I need to search for a value using xpath to a node i
get from a document. 
So first i get a required node from the document.
and then send this node to run xpath.
works fine but there is a serious problem. XPathAPI
searches for the requested value in the first node of
the whole document, not the node that i pass.

I am new but my guess is when i pass node to XPathAPI
it searches the whole document
(node.getOwnerDocument()). 

What is a solution to it?

thankx



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

---------------------------------------------------------------------
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]

Reply via email to