|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.xml.dom.XPNode com.plumtree.openfoundation.xml.dom.XPDocument
The XPDocument
class is a wrapper for objects implementing
org.w3c.dom.Document
interface.
Please refer to Node (Java 2 Platform SE v1.4.2)
for detail information.
Field Summary |
Fields inherited from class com.plumtree.openfoundation.xml.dom.XPNode |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
XPDocument()
Creates a new XPDocument object. |
|
XPDocument(org.w3c.dom.Document currDoc)
Creates a new XPDocument object. |
Method Summary | |
XPAttr |
CreateAttribute(java.lang.String name)
Creates an XPAttr of the given name. |
XPAttr |
CreateAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Creates an attribute of the given qualified name and namespace URI. |
XPComment |
CreateComment(java.lang.String data)
Creates a XPComment node given the specified string. |
XPCDATASection |
CreateDataSection(java.lang.String data)
Creates a XPCDATASection node whose value is the specified
string. |
XPDocumentFragment |
CreateDocumentFragment()
Creates an empty XPDocumentFragment object. |
XPElement |
CreateElement(java.lang.String tagName)
Creates an element of the type specified. |
XPElement |
CreateElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Creates an element of the given qualified name and namespace URI. |
XPProcessingInstruction |
CreateProcessingInstruction(java.lang.String target,
java.lang.String data)
Creates a XPProcessingInstruction node given the specified
name and data strings. |
XPText |
CreateTextNode(java.lang.String value)
Creates a XPText node given the specified string. |
XPDocumentType |
GetDocType()
The Document Type Declaration (see XPDocumentType )
associated with this document. |
XPElement |
GetDocumentElement()
This is a convenience attribute that allows direct access to the child node that is the root element of the document. |
XPElement |
GetElementByID(java.lang.String elementID)
Returns the XPElement whose ID is given by
elementId . |
XPNodeList |
GetElementsByTagName(java.lang.String tagName)
Returns a XPNodeList of all the XPElement s
with a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the XPDocument tree. |
XPNodeList |
GetElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
Returns a XPNodeList of all the XPElement s with
a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the XPDocument tree. |
java.lang.String |
GetEncoding()
Return this XPDocument's encoding string. |
org.w3c.dom.Node |
GetUnderlyingObject()
Retrieve the underlying Node object. |
XPNode |
ImportNode(XPNode importedNode,
boolean deep)
Imports a node from another document to this document. |
void |
SetEncoding(java.lang.String encoding)
Set the encoding of this XPDocument (part of XML Declaration). |
Methods inherited from class com.plumtree.openfoundation.xml.dom.XPNode |
AppendChild, CloneNode, GetAttributes, GetChildNodes, GetFirstChild, GetLastChild, GetLocalName, GetNamespaceURI, GetNextSibling, GetNodeName, GetNodeType, GetNodeValue, GetOwnerDocument, GetParentNode, GetPrefix, GetPreviousSibling, HasAttributes, HasChildNodes, InsertBefore, IsAttributeNode, IsCDATASectionNode, IsCommentNode, IsDocumentFragmentNode, IsDocumentNode, IsDocumentTypeNode, IsElementNode, IsProcessingInstructionNode, IsSupported, IsTextNode, Normalize, RemoveChild, ReplaceChild, SetNodeValue, SetPrefix, StoreNode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XPDocument()
public XPDocument(org.w3c.dom.Document currDoc)
currDoc
- - underlying currdocMethod Detail |
public XPAttr CreateAttribute(java.lang.String name)
XPAttr
of the given name.
name
- - string of attribute name.
public XPAttr CreateAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
namespaceURI
- - namespace URI of the attribute to createqualifiedName
- - name used in creation
public XPComment CreateComment(java.lang.String data)
XPComment
node given the specified string.
data
- - data of new comment
public XPCDATASection CreateDataSection(java.lang.String data)
XPCDATASection
node whose value is the specified
string.
data
- - data value to be created
public XPDocumentFragment CreateDocumentFragment()
XPDocumentFragment
object.
public XPElement CreateElement(java.lang.String tagName)
tagName
- - element's name
public XPElement CreateElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
namespaceURI
- - namespace of elementqualifiedName
- - name of element to be created
public XPProcessingInstruction CreateProcessingInstruction(java.lang.String target, java.lang.String data)
XPProcessingInstruction
node given the specified
name and data strings.
target
- - target part of the processing instruction.data
- - data for the node.
public XPText CreateTextNode(java.lang.String value)
XPText
node given the specified string.
value
- - text node's value
public XPDocumentType GetDocType()
XPDocumentType
)
associated with this document.
public XPElement GetDocumentElement()
root
element of the document.
public XPElement GetElementByID(java.lang.String elementID)
XPElement
whose ID is given by
elementId
.
elementID
- - element's id value
public XPNodeList GetElementsByTagName(java.lang.String tagName)
XPNodeList
of all the XPElement
s
with a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the XPDocument
tree.
tagName
- - name for which to search
public XPNodeList GetElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
XPNodeList
of all the XPElement
s with
a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the XPDocument
tree.
namespaceURI
- - namespace in which to look for elementslocalName
- - name of elements
public org.w3c.dom.Node GetUnderlyingObject()
Node
object.
GetUnderlyingObject
in class XPNode
public void SetEncoding(java.lang.String encoding)
encoding
- - name of the encodingpublic java.lang.String GetEncoding()
public XPNode ImportNode(XPNode importedNode, boolean deep)
importedNode
- - node to be importeddeep
- - deep vs shallow copy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |