This class excludes access to most of the structure of the XML standards, especially character encodings, namespaces, text nodes, comments, entity declarations, CDATA, processor instructions, and everything to do with schemas. It preserves the serialization capability though, exploiting the readable character streams and built-in parsing of XML.
DOM structure is reduced to an elementary tree of XmlDocument.XmlNode objects. Each of these Nodes has a name (String), attributes (String key-value pairs), and children (all Nodes). Simple as could be.
Each instance represents one Document, which is always and only accessible through its root XmlDocument.XmlNode.
The static factory methods do not offer any customization options. in particular, they do not enforce XML Namespaces when parsing, do not offer customizable element factories, and discard certain information which is not intended to be significant to applications. If your application requires more sophisticated use of DOM, you may need to use SAX directly with an XmlDocumentBuilder.
Instances are factories for their subsidiary nodes, but applications may provide their own element factory to bind element tags to particular DOM implementation classes (which must subclass ElementNode). For example, a factory may use a set of classes which support the HTML DOM methods, or which support methods associated with XML vocabularies for specialized problem domains as found within Internet Commerce systems. For example, an element tag <PurchaseOrder>
could be mapped to a com.startup.commerce.PurchaseOrder
class. The factory can also use XML Namespace information, if desired.
Since DOM requires nodes to be owned exclusively by one document, they can't be moved from one document to another using DOM APIs. This class provides an changeNodeOwner functionality which may be used to change the document associated with a node, and with any of its children.
Only the core DOM model is supported here, not the HTML support. Such support basically adds a set of convenience element types, and so can be implemented through element factories and document subclasses. @see XmlDocumentBuilder @author David Brownell @version $Revision: 1.7 $
See the package summary for a brief description of how to use this class. @author Steve Neuendorffer, John Reekie @version $Id: XmlDocument.java,v 1.12 2005/07/08 19:55:20 cxh Exp $
@
Selects attributes Examples Path Expression Result bookstore Selects all the child nodes of the bookstore element /bookstore Selects the root element bookstore Note: If the path starts with a slash ( / ) it always represents an absolute path to an element! bookstore/book Selects all book elements that are children of bookstore //book Selects all book elements no matter where they are in the document bookstore//book Selects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element //[@lang] Selects all attributes that are named lang //[@lang='eng'] Selects all attributes that are named lang and have the value eng
The static factory methods do not offer any customization options. in particular, they do not enforce XML Namespaces when parsing, do not offer customizable element factories, and discard certain information which is not intended to be significant to applications. If your application requires more sophisticated use of DOM, you may need to use SAX directly with an XmlDocumentBuilder.
Note: element factories are deprecated because they are non-standard. They are only provided in this version for backwards compatibility. Instances are factories for their subsidiary nodes, but applications may provide their own element factory to bind element tags to particular DOM implementation classes (which must subclass ElementNode). For example, a factory may use a set of classes which support the HTML DOM methods, or which support methods associated with XML vocabularies for specialized problem domains as found within Internet Commerce systems. For example, an element tag <PurchaseOrder>
could be mapped to a com.startup.commerce.PurchaseOrder
class. The factory can also use XML Namespace information, if desired.
Since DOM requires nodes to be owned exclusively by one document, they can't be moved from one document to another using DOM APIs. This class provides an changeNodeOwner functionality which may be used to change the document associated with a node, and with any of its children.
Only the core DOM model is supported here, not the HTML support. Such support basically adds a set of convenience element types, and so can be implemented through element factories and document subclasses. @see XmlDocumentBuilder @author David Brownell @author Rajiv Mordani @version $Revision: 1.10 $
The static factory methods do not offer any customization options. in particular, they do not enforce XML Namespaces when parsing, do not offer customizable element factories, and discard certain information which is not intended to be significant to applications. If your application requires more sophisticated use of DOM, you may need to use SAX directly with an XmlDocumentBuilder.
Note: element factories are deprecated because they are non-standard. They are only provided in this version for backwards compatibility. Instances are factories for their subsidiary nodes, but applications may provide their own element factory to bind element tags to particular DOM implementation classes (which must subclass ElementNode). For example, a factory may use a set of classes which support the HTML DOM methods, or which support methods associated with XML vocabularies for specialized problem domains as found within Internet Commerce systems. For example, an element tag <PurchaseOrder>
could be mapped to a com.startup.commerce.PurchaseOrder
class. The factory can also use XML Namespace information, if desired.
Since DOM requires nodes to be owned exclusively by one document, they can't be moved from one document to another using DOM APIs. This class provides an changeNodeOwner functionality which may be used to change the document associated with a node, and with any of its children.
Only the core DOM model is supported here, not the HTML support. Such support basically adds a set of convenience element types, and so can be implemented through element factories and document subclasses. @see XmlDocumentBuilder @author David Brownell @author Rajiv Mordani @version $Revision: 1.9 $
{@link Document}
. It only provides the necessary functionality needed by the FEST-Swing JUnit extension.
@author Alex Ruiz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|