- I have no idea how this makes sense, why would this work and the same response I get from a server won't? maybe it's about spaces or empty lines?
@Jeff: when I tried to remove the </br> tags it did work , no idea why though. @Jason:the program gets an error on: Document doc = XMLParser.parse(xml); so I have no idea exactly how it helps. Thanks for the responses. On Apr 21, 6:31 pm, Igor <igor.secan...@gmail.com> wrote: > Hi, > > I tried this (one) line of code on the client side of gwt 1.5.3, > Ubuntu HH, mozilla-1.7.12 -- and -- it was ok: > > com.google.gwt.xml.client.Document doc = XMLParser.parse("<?xml > version=\"1.0\" encoding=\"UTF-8\" ?><result><a href=\"http:// > cgi.ebay.com/APPLE-iPod-8gb-Blue-Nano-4th-Gen-Video-MP3-8-gb-Grade- > A_W0QQitemZ170323321285QQcategoryZ73839QQcmdZViewItem\">APPLE iPod > 8gbBlue Nano 4th Gen Video MP3 8 gb Grade A</a><br /><a href=\"http:// > cgi.ebay.com/APPLE-IPOD-NANO-8GB-PINK-4th-Gen-VIDEO-8-GB-MP3-Grade- > A_W0QQitemZ170323318228QQcategoryZ73839QQcmdZViewItem\">APPLE IPOD > NANO 8GB PINK 4th Gen VIDEO 8 GB MP3 Grade A</a> <br /> <a href= > \"http://cgi.ebay.com/APPLE-iPod-8gb-Blue-Nano-4th-Gen-Video-MP3-8-gb- > Grade-A_W0QQitemZ170323326712QQcategoryZ73839QQcmdZViewItem\">APPLE > iPod 8gb Blue Nano 4th Gen Video MP3 8 gb Grade A</a> <br /></ > result>"); > > On Apr 21, 3:02 am, "codeboo...@gmail.com" <ecd...@gmail.com> wrote: > > > > > Hello everyone > > > when I give my gwt to parse the following XML file , I get an error: > > > <?xml version="1.0" encoding="UTF-8" ?> > > <result> > > <a href="http://cgi.ebay.com/APPLE-iPod-8gb-Blue-Nano-4th-Gen-Video- > > MP3-8-gb-Grade- > > A_W0QQitemZ170323321285QQcategoryZ73839QQcmdZViewItem">APPLE iPod 8gb > > Blue Nano 4th Gen Video MP3 8 gb Grade A</a> > > <br /> > > <a href="http://cgi.ebay.com/APPLE-IPOD-NANO-8GB-PINK-4th-Gen-VIDEO-8- > > GB-MP3-Grade- > > A_W0QQitemZ170323318228QQcategoryZ73839QQcmdZViewItem">APPLE IPOD NANO > > 8GB PINK 4th Gen VIDEO 8 GB MP3 Grade A</a> > > <br /> > > <a href="http://cgi.ebay.com/APPLE-iPod-8gb-Blue-Nano-4th-Gen-Video- > > MP3-8-gb-Grade- > > A_W0QQitemZ170323326712QQcategoryZ73839QQcmdZViewItem">APPLE iPod 8gb > > Blue Nano 4th Gen Video MP3 8 gb Grade A</a> > > <br /> > > </result> > > > and I have no idea why, I checked this XML file with an XML editor it > > looks like everything is ok. > > I also tried to parse another XML file and it was ok. > > > The error: > > > [ERROR] Uncaught exception escaped > > com.google.gwt.xml.client.impl.DOMParseException: Failed to parse: > > > <?xml version="1.0" encoding="UTF-8"?><result><a href="http:// > > cgi.ebay.com/APPLE-iPod-8gb-Blue-Nano-4th-Gen-Video-MP3-8- > > at com.google.gwt.xml.client.impl.XMLParserImpl.parse > > (XMLParserImpl.java:280) > > at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47) > > at avf.client.AvfGui.loadCities(AvfGui.java:212) > > at avf.client.AvfGui$1$1.onResponseReceived(AvfGui.java:149) > > at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl > > (Request.java:264) > > at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch > > (Request.java:236) > > at com.google.gwt.http.client.Request.fireOnResponseReceived > > (Request.java:227) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java: > > 103) > > at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod > > (IDispatchImpl.java:126) > > at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke > > (IDispatchProxy.java:155) > > at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke > > (IDispatchImpl.java:294) > > at com.google.gwt.dev.shell.ie.IDispatchImpl.method6 > > (IDispatchImpl.java:194) > > at org.eclipse.swt.internal.ole.win32.COMObject.callback6 > > (COMObject.java:117) > > at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) > > at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925) > > at > > org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966) > > at com.google.gwt.dev.SwtHostedModeBase.processEvents > > (SwtHostedModeBase.java:235) > > at com.google.gwt.dev.HostedModeBase.pumpEventLoop > > (HostedModeBase.java:558) > > at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405) > > at com.google.gwt.dev.HostedMode.main(HostedMode.java:232) > > Caused by: com.google.gwt.core.client.JavaScriptException: (Error): > > line 5, char 3:Invalid xml declaration. > > > description: line 5, char 3:Invalid xml declaration. > > > at com.google.gwt.xml.client.impl.XMLParserImplIE6.parseImpl(Native > > Method) > > at com.google.gwt.xml.client.impl.XMLParserImpl.parse > > (XMLParserImpl.java:278) > > at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47) > > at avf.client.AvfGui.loadCities(AvfGui.java:212) > > at avf.client.AvfGui$1$1.onResponseReceived(AvfGui.java:149) > > at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl > > (Request.java:264) > > at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch > > (Request.java:236) > > at com.google.gwt.http.client.Request.fireOnResponseReceived > > (Request.java:227) > > > Any help will be highly appreciated > > Charlie- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---