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 write an Xpath expression that selects two nodes? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How do I write an Xpath expression that selects two nodes?" Watch "How do I write an Xpath expression that selects two nodes?" New topic
Author

How do I write an Xpath expression that selects two nodes?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm using Java 6. How do I write an path expression that selects two elements? For example, I have each of these expressions …



and each on their own selects an element from the part of the DOM I want. However, if I try and combine them like so …



I get the following exception …



Thanks, - Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I write an Xpath expression that selects two nodes?