Work is underway to support binding to w3c DOM node. See (for the moment) [http://tk-ui.svn.sourceforge.net/svnroot/tk-ui/inbox/ TK-UI SVN] or [https://bugs.eclipse.org/bugs/show_bug.cgi?id=243380 Bug 243380]-

+

Work is underway to support binding to w3c DOM nodes. See (for the moment) [http://tk-ui.svn.sourceforge.net/svnroot/tk-ui/inbox/ TK-UI SVN] or [https://bugs.eclipse.org/bugs/show_bug.cgi?id=243380 Bug 243380]-

−

you can find two plug-in project that provides DOM-based observables :

+

you can find two plug-in projects that provide DOM-based observables :

The DOM bindings project gives you two means to bind to a w3c DOM Node, just like other JFace Databinding implementations (SWT, Beans, Pojo...),
through the use of a factory that creates DOM-based IObservableValue and IObservableList implementations :

org.eclipse.core.databinding.dom.DOMObservables : this factory give you the capability to bind to a DOM Node
by setting explicitly the DOM Node to bind to (ex : for instance, retrieve the DOM Node with Document#getElementsByTagName method).

org.eclipse.core.databinding.dom.DOMXPathObservables : this factory give you capability to bind to a DOM Node
retrieved via XPath. With this factory you can set the DOM Document as the root node and use an XPath Expression
to select the Node to bind to.

org.eclipse.core.databinding.dom.DOMObservables factory give you capability to bind to a DOM Node
by setting explicitly the DOM Node to bind to
(ex : for instance, retrieve the DOM Node with Document#getElementsByTagName method) :

DOMObservables#observeAttrValue : Observe an Attribute value of a DOM Element. For example, you can bind the attribute value
of a DOM element with Text property of an SWT Text.

DOMObservables#observeAttrPresent : Observe if an attribute (attribute name) of DOM Element is present.
You can for example bind attribute (ex : checked="checked") of DOM element with Selection property of SWT Button (SWT.CHECK).
When you check the Checkbox, the DOM element has checked attribute with "checked" value, when you uncheck the Checbox
ckecked attribute is removed from DOM Element.

DOMObservables#observeCharacterData : Observe character data of DOM Node. You can for example bind character data of
DOM Element (Text content) with Text property of SWT Text.

DOMObservables#observeContent : Observe DOM node content, in other words observe when the subtree of DOM Node
is modified. You can for example bind DOM Document content with Text property of SWT Text (SWT.MULTI) to observe
any update of the DOM Document. As soon as the DOM Document is updated (ex : an attribute value is modified),
the SWT Text is refreshed with the new DOM Document content.

org.eclipse.core.databinding.dom.DOMXPathObservables factory give you capability to bind DOM Node
retrieved with XPath. With this factory you can set the DOM Document as root node and use XPath Expression
to retrieve Node to bind.

You can see that in this sample the observed Node is retrieved with Document#getElementsByTagName method.
You can use XPath to retrieve Node to observe. To do that you must use DOMXPathObservables DOM observables factory.

DOM binding sample/Table Master detail

Right textarea is bounded with DOM Document. So if you type some XML content, it update content of widgets (Table, Text...).
If you update Text widget (Person name), it update the DOM Document and the textarea.