lucas clemente
lucas clemente

Reputation: 6389

DOM (Events) in GWT

I have a bit of a trouble understanding GWT's architecture. I can see two packages: com.google.gwt.dom.client and com.google.gwt.xml.client. As far as I understand, the first gives a wrapper for the HTML DOM and the second is for own DOM Documents. Is this correct?

What I need is an own Document (i.e. not the HTML Document) with Mutation Events. What would I use in this case? Is this possible in GWT or do I have to write my own DOM implementation, based on com.google.gwt.xml.client?

Upvotes: 1

Views: 926

Answers (1)

user467871
user467871

Reputation:

com.google.gwt.dom.client Javadoc :

Classes for low-level DOM programming. This package contains classes that expose the W3C standard HTML document object model for programmatic access and manipulation of HTML pages directly in client-side Java source, accounting for most browser variations. These classes provide an efficient, type-safe, and IDE-friendly alternative to writing JavaScript Native Interface (JSNI) methods for many common tasks

com.google.gwt.xml.client Javadoc :

Basic classes used in XML DOM parsing and XML document generation. The classes in this package support parsing XML documents and creating new XML documents. The implementation uses the underlying browser.

Briefly, dom.client package is html parser (manipulation of HTML pages) and xml.client is for parsing XML documents. In your situation you can use gwt xml parser and here is good example for it xml parser in gwt

Upvotes: 2

Related Questions