On Thursday, March 14, 2013 8:02:13 AM UTC-5, 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:
> <item>
>  <ACCT000>31MEB0009</ACCT000>
>  <ACCT068>C. WALKER         - SHORT TITLE LINE</ACCT068>
>  <ACCT069>C. WALKER          - LONG TITLE LINE</ACCT069>
>  <ACCT070>C. WALKER          - LONG TITLE LINE</ACCT070>
>  <ACCT071> </ACCT071>
>  <ACCT072> </ACCT072>
>  <ACCT073> </ACCT073>
>  <ACCTA95>31</ACCTA95>
>  <ACCTA70>BROWN DEER</ACCTA70>
>  <ACCT324> </ACCT324>
>  <ACCT325> </ACCT325>
>  <ACCT006>06261997</ACCT006>
>  <ACCT008></ACCT008>
>  <ACCT004> </ACCT004>
>  <ACCT005>50<vlst>
> </item>
>  
> just one note that when I get the data from the requestbuilder call, there 
> are not CR and LFs in the data.
>  
> Here is some of the code I am trying:
> com.google.gwt.xml.client.Document doc = XMLParser.parse(item);
>  
> //NodeList elements = doc.getElementsByTagName("ITEM");
>  NodeList elements = doc.getChildNodes();
>  int fieldCount = elements.getLength();//  always 1
>   Window.alert(String.valueOf(fieldCount));
>  for(int i = 0; i < fieldCount; i++)
>  {
>   Node element = elements.item(i);
>   String name = element.getNodeName();
>   String value = element.getNodeValue();
>   Window.alert("Name = "+name);
>   Window.alert("Value = "+value); 
>   }
>  
> Any help would be great!
>  
>
I am using GWT 2.4
 

>  
>  
>

-- 
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