Meaningless Drivel is fun!*
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 Spring in Action this week in the Spring 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: 18664
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how do i check for the presence of a node through XML