Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
shoeb sayyed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Clapham
Sheriff
Posts: 22472
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!