I seem to remember that there are two different XML libraries.. I used these imports:
import com.google.gwt.xml.client.CDATASection; import com.google.gwt.xml.client.Document; import com.google.gwt.xml.client.Element; import com.google.gwt.xml.client.NodeList; import com.google.gwt.xml.client.Text; import com.google.gwt.xml.client.XMLParser; This inherits tag: <inherits name='com.google.gwt.xml.XML'/> On Thu, Jun 25, 2009 at 3:50 PM, G <[email protected]> wrote: > > Hello - > > I am little frustrated with GWT, firstly importing external jar in GWT > isn't trivial and secondly simple XML parsing doesnt work. > > At this point, I dont care much about importing external jars and will > leave that for later. > > What I dont understand is why simple XML parsing is not working ... I > am getting no compile time errors.. using GWT gwt-windows-1.5.3. > > In my project .gwt.xml I added <inherits > name="com.google.gwt.xml.XML" /> > > I am running in the hosted mode and it bombs with the exception: > java.lang.ClassCastException: > com.google.gwt.xml.client.impl.DocumentImpl cannot cast to > com.google.gwt.dom.client.Document > > Even this doesn't work: > Document messageDom = (Document) XMLParser.parse("<?xml version='1.0'? > ><message></message>"); > > Thanks > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
