On 15 oct, 13:39, Parmeet Kohli <parmeet.ko...@gmail.com> 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 ?
No, I'd rather say an IE bug, as the XML declaration shouldn't ever
appear as a node in the DOM.
...and a bug in your code, as you shouldn't have an XML declaration
when passing a String to the parser (as I already said here a few days
ago, there's no need to declare an encoding in this case, as a String
is made of characters, not bytes).
> PS: document.toString() prints the entire XML perfectly even in FF.
How about using document.getDocumentElement() as the starting point
for your "parsing"?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---