jQuery in Action, 3rd edition
The moose likes XML and Related Technologies and the fly likes how to get the whole NodeList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to get the whole NodeList" Watch "how to get the whole NodeList" New topic

how to get the whole NodeList

Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
<Department name="Math" ....>
<address ..>

<Department name="History" ..>
<address ...>

<Department ...

I want to get a "NodeList" of <Department>, i.e a list of <Department>s. However, when I do

XPathAPI.selectNodelist(Document, "/root/.../University/");

It returns an "Element". How to select an entire list of <Department>s as a NodeList ?

Miguel Capo

Joined: Oct 08, 2006
Posts: 14
I believe that the following expression should give you all the nodes that you are after

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: how to get the whole NodeList
It's not a secret anymore!