Nevermind, got it sorted:
Document termsDom = XMLParser.parse(myXmlText);
NodeList termsList = termsDom.getElementsByTagName("Result");
for (int i = 0; i < termsList.getLength(); i++) {
Element results = (Element) termsList.item(i);
String result = results.getFirstChild().getNodeValue();
On Apr 4, 4:58 pm, "[email protected]"
<[email protected]> wrote:
> Hi all!
>
> I'm wondering how I can use NodeList with an XML file so output a list
> of values from tags of the same type:
>
> <ResultSet>
> <result>1st value</result>
> <result>2nd value</result>
> <result>3rd value</result>
> <result>4th value</result>
> <ResultSet>
>
> In case case I would like to output all the result tags, I am familar
> with using XMLParser but am having trouble with finding a way to
> iterate through a set of values and outputting all of them in order.
>
> Cheers!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---