First, it appears that your XML is invalid ... your last child element has 
a beginning tag of "ACCT005" and an ending tag of "vlst".  Assuming that 
this isn't your only problem, I think you are just not getting the child 
nodes of the "item" element, but instead you are getting the child nodes of 
the document (which would be the "item" element node).  This is how I'd 
fulfill your requirements:

  final Document doc = XMLParser.parse(item);
  final Element itemElement = 
(Element)doc.getElementsByTagName("item").item(0);
  Node node = itemElement.getFirstChild();
  while (node != null) {
    if (node.getNodeType() == Node.ELEMENT_NODE) {
      // node is an account element
    }
    node = node.getNextSibling();
  }

Note that not all child nodes will necessarily be Element nodes ... hence 
the check for NodeType == Node.ELEMENT_NODE.

Andy

On Thursday, March 14, 2013 6:02:13 AM UTC-7, skippy wrote:
>
> I am trying to load this xml file into a hashmap or list using XMLParser.  
> What ever I try, I keep getting a node list of 1 with all the nodes in it.
>  
> Here is an example of the xml file:
> ...
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to