aspose file tools*
The moose likes XML and Related Technologies and the fly likes how do i check for the presence of a node through XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how do i check for the presence of a node through XML" Watch "how do i check for the presence of a node through XML" New topic
Author

how do i check for the presence of a node through XML

shoeb sayyed
Ranch Hand

Joined: Mar 14, 2010
Posts: 48
i need to check for the presence of the blob in the following XML file using XML




i tried using <xsl:if test="root/items/blob"> but it is not working can you suggest a solution


Thanks,
Shoeb
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18154
    
    8

Presumably, then, your context node wasn't the document element when you executed that element. You used a relative XPath expression there, which is relative to your context node. If you can't fix it to be relative to the actual context node at execution time, you could always use an absolute XPath expression.
 
 
subject: how do i check for the presence of a node through XML
 
Similar Threads
Question related to <c:forEach> & <c:if>
Ajax Frameworks and servlets question
Recursive program help
Regarding Combobox Swing
Problem with session