This is something you simply can't do cleanly across all the browsers. The 
elements returned by the 
XMLParser are totally different classes to the HTMLParser. The way to do this 
is to set the 
innerHTML on an HTML Element object to the value returned from the 
RequestBuilder. Then you can use 
the normal Element.getChildNodes() to fetch the DOM objects that were returned 
from the service.

Cristiano wrote:
> Hello Everyone,
> 
> How to 'cast' or 'transform' a "com.google.gwt.xml.client.Document" to
> a "com.google.gwt.dom.client.Document" ???
> 
> I'm dealing with the requirement of handling DOM elements retrieved by
> a server (as an HTTP "xml/text" response), parse them with XMLParser
> and them into an existing document:
> 
> I handle the DOM of the current page with
> com.google.gwt.dom.client.Document and com.google.gwt.user.client.DOM.
> 
> I handle the HTTP request with the RequestBuilder.
> 
> I parse them with com.google.gwt.xml.client.XMLParser.
> 
> However the "com.google.gwt.xml.client.XMLParser" do return a
> "com.google.gwt.dom.client.Document", and I cannot add it to a
> "com.google.gwt.dom.client.Document" because appendChild does not
> accept as input a "com.google.gwt.xml.client.Element": it wants a
> "com.google.gwt.doc.client.Element".
> 
> Can you help me in find the right direction resolve this (I'm using
> eclipse)?
> 
> Thanks,
> Cristiano
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to