----- Original Message -----
Sent: Sunday, November 16, 2003 2:59 PM
Subject: Re: [dom4j-user] [dom4j] - Does node exist

Actually this doesn't always work either. The best I have some up with is:
 
    node.selectNodes(text).size() > 0
 
which I am assuming is not very efficient.
 
Is there a better way????
 
thanks - dave
 
 
----- Original Message -----
Sent: Sunday, November 16, 2003 1:45 PM
Subject: [dom4j-user] [dom4j] - Does node exist

Hi;
 
What is the most efficient way to determine if a node exists. The only way I have founs so far is:
 
if (node.matches(text))
 
where text is the xpath to the node I am looking for and node is a Node I start the search from.
 
thanks - dave

Reply via email to