File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 18121
    
    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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how do i check for the presence of a node through XML
 
Similar Threads
Regarding Combobox Swing
Problem with session
Question related to <c:forEach> & <c:if>
Recursive program help
Ajax Frameworks and servlets question