Win a copy of Java Concurrency Live Lessons this week in the Threads 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: 22185
38
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!