Skip navigation links
org.netbeans.modules.xml.xdm/1 1.58.0 1

XML Document Model (XDM)
Under Development

See: Description

XML Document Model (XDM) 
Package Description
org.netbeans.modules.xml.xdm
APIs for obtaining an XDM document and mutating the XDM tree.
org.netbeans.modules.xml.xdm.diff
XML diff capabilities.
org.netbeans.modules.xml.xdm.nodes
XDM-based implementation of DOM interfaces.
org.netbeans.modules.xml.xdm.visitor
Visitors for operations over the XDM such as generating XPath expressions, calculating document position and finding elements by position.
org.netbeans.modules.xml.xdm.xam
XAM model and component abstractions based on XDM tree.

XDMXDM (XML Document Model) provides a XAM based full fidelity XML model which implements the org.w3c.dom interfaces. The intention is not to provide an an alternate implementation of the dom interfaces but only to reuse part of the api where it makes sense and more importantly provide a foundation on which to provide a model basis for graphical multi way editors.

This module was developed to support the following requirements:

What is New (see all changes)?

Use Cases

The typical client of XDM would be a tool author supporting an XML language who wants to provide a custom client API. A concrete example of this is the XML Schema model. The XML Schema model starts by subclassing AbstractXDMModel and providing the component updater, which is called in conjunction with sync to mutate the model according to changes in the underlying source.

WSDL model
The WSDL model is based on the XDM model and relies on the XDM capabilities to provide the infrastructure necessary for providing a XAM based model.
Schema model
The Schema model is based on the XDM model and relies on the XDM capabilities to provide the infrastructure necessary for providing a XAM based model.
BPEL model
The BPEL model is based on the XDM model and relies on the XDM capabilities to provide the infrastructure necessary for providing a XAM based model. The XDM model can be used in standalone mode.

BaseDocument sd = ...;
Lookup lookup = Lookups.singleton(sd);
// create an editable ModelSource with base document
// in the lookup (this is required)
ModelSource ms = new ModelSource(lookup, true);
// create an XDMModel
XDMModel model = new XDMModel(ms);
// sync the XDM model with the underlying source
model.sync();
// create customer element, same as dom
Element customer = model.getDocument().createElement("customer");
// add to the model as 0th child of employee element, not shown
model.add(employee,customer,0);

Exported Interfaces

This table lists all of the module exported APIs with defined stability classifications. It is generated based on answers to questions about the architecture of the module. Read them all...
Group of java interfaces
Interface NameIn/OutStabilitySpecified in What Document?
XDMExportedUnder Development

XDM (XML Document Model)

Implementation Details

Where are the sources for the module?

The sources for the module are in the Apache Git repositories or in the GitHub repositories.

What do other modules need to do to declare a dependency on this one, in addition to or instead of a plain module dependency?

Read more about the implementation in the answers to architecture questions.

Skip navigation links
org.netbeans.modules.xml.xdm/1 1.58.0 1