try

Document xmlDocument = XMLParser.parse(result);
XMLParser.removeWhitespace(xmlDocument);

It was a while ago that I ran across this but I remember having a
problem with the parser getting whitespaces as empty Node objects.

The document itself is also from the Node interface so to get your
first Node you need to try something like:

if(xmlDocument != null) {
  NodeList documentNodes = xmlDocument.getChildNodes();  // the
declaration is also a Node

  for(int i = 0; i < documentNodes.getLength(); i++) {
    Node currentNode = documentNodes.item(i);

    if(currentNode != null && currentNode.getNodeName
().equalsIgnoreCase("TestCase")) {
      return currentNode;
    }
  }
}



Good Luck!


On Oct 15, 7:39 am, Parmeet Kohli <[email protected]> wrote:
> Hi,
>
>     Has anyone faced an issue with parsing XML in FF ??
>     I hope i can explain the problem  accurately.
>     My XML starts with
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>    <TestCase>
>         <URL>http://192.168.0.153:8080/axis2/services/Calculator?wsdl</
> URL>
>         <TestStep> ...........
>
> Now in IE as well as the hosted mode,
>
>     Document document = XMLParser.parse(xmlContent);
>     Node encodingElem = document.getFirstChild();
>     PopUp.showPopUp("ENCODING:",  encodingElem.getNodeValue()); //
> helper function .. just shows a pop up
>
> the above code shows a pop with string "?xml version="1.0"
> encoding="ISO-8859-1"?"
> but in FF it prints null !!
>
> I'm doing a whole lot of parsing after this which works perfect in IE
> and hosted mode but FF just doesn't go any further !!
>
> Is this a GWT bug ?
>
> PS: document.toString() prints the entire XML perfectly even in FF.
>
> Appreciate any help
>
> Thank you,
> Parmeet
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to