Separating XML contents to create lists

I want to separate the XML contents so that I can create lists. How do I create a dropdown list based on the XML contents?
[143 byte] By [tnr009] at [2007-9-26 2:02:21]
# 1
I don't know how to create a drop down list from XML content. But I can tell you how to extract XML out.Ironluca@yahoo.com
Ironluca at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
I know how to extract XML out using XSLT servlet, but, the output is full of tags. What I want is sort of list or I can create navigation with.
tnr009 at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

If I understand you right then you might try something like this:

Say your XML doc was:

<books>

<book>book 1</book>

<book>book 2</book>

<book>book 3</book>

<book>book 4</book>

</books>

just get the NodeList of <book> nodes, iterate through them, building your JList as you go. Did that help ?

mtndood at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Yes, that's correct! I understand what you're saying. Do you mind providing an example of how to get the NodeList of this <book> nodes, iterate through them and build the JList?Thanks.
tnr009 at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
I know I can do the first using vectors, but, I'm still unclear about placing items in the JList.Please help!!!
tnr009 at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
You just follow mtndood's instruction and instead of creating a Vector, you use JList's ListModel to add your elements to your JList.see http://java.sun.com/docs/books/tutorial/uiswing/components/list.html#mutable for further help.Good luck.
lk555 at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7
Hi,Thanks for the URL. But, in the example, it shows individual strings. What I want is to extract values from a file which may contain 10,000 entries. Please let me know how would I do that.TIA,
tnr009 at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 8
Well, you'd just convert the values to strings to put'em into the list, e.g. (""+value).
lk555 at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 9
Can you provide an example please?
sundance at 2007-6-29 8:43:44 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...