public class QElement extends QAttributedNode implements CauchoElement
QNode.ChildNodeList
_firstChild, _lastChild
L
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Modifier | Constructor and Description |
---|---|
|
QElement()
Create a new element.
|
protected |
QElement(QDocument owner,
QName name) |
|
QElement(QName name)
Create a new named element.
|
|
QElement(java.lang.String name)
Create a new named element.
|
|
QElement(java.lang.String name,
java.lang.String namespace)
Create a new named element.
|
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node child)
Appends a new node as the last child of the element.
|
boolean |
equals(org.w3c.dom.Node arg,
boolean deep) |
boolean |
equals(java.lang.Object arg) |
java.lang.String |
getCanonicalName()
Returns the canonical name of the element.
|
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String tagName)
Returns a list of elements, given a tag name.
|
org.w3c.dom.NodeList |
getElementsByTagNameNS(java.lang.String uri,
java.lang.String name)
Returns a list of elements, given a namespace and a local name.
|
java.lang.String |
getLocalName()
Returns the local part of the element's name.
|
java.lang.String |
getNamespace(java.lang.String prefix)
Given a prefix, returns the namespace in effect at this element.
|
java.lang.String |
getNamespaceURI()
Returns the namespace of the element.
|
java.lang.String |
getNodeName()
Returns the element's qualified-name as the node name.
|
short |
getNodeType()
Returns the DOM NodeType, ELEMENT_NODE.
|
java.lang.String |
getPrefix()
Returns the namespace prefix for the element.
|
QName |
getQName()
Returns the qname
|
org.w3c.dom.TypeInfo |
getSchemaTypeInfo()
Returns the schema type.
|
java.lang.String |
getTagName()
Returns the element's qualified-name as the node name.
|
java.lang.String |
getTextValue()
Returns the text value of the element.
|
boolean |
hasContent() |
void |
normalize()
Normalize the element, i.e.
|
void |
setName(QName name)
Assign a name to the element.
|
java.lang.String |
toString() |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getFirstAttribute, hasAttribute, hasAttributeNS, hasAttributes, removeAttribute, removeAttributeNode, removeAttributeNodeNS, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, unlink
checkValid, getChildNodes, getFirstChild, getLastChild, getNextPreorder, getNextSibling, getNodeValue, getPreviousSibling, hasChildNodes, insertBefore, removeChild, replaceChild, setNodeValue, setTextContent
baseURI, cloneNode, compareDocumentPosition, compareTreePosition, getBaseURI, getColumn, getDependencyList, getFeature, getFilename, getInterface, getLine, getNextContent, getOwnerDocument, getParentNode, getPreviousContent, getTextContent, getUserData, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, print, printHtml, printPretty, setFeature, setLocation, setPrefix, setUserData, supports
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFirstAttribute
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
checkValid, getBaseURI, getColumn, getFilename, getLine, print, printHtml, printPretty, setLocation
cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public QElement()
public QElement(java.lang.String name)
name
- the element's name.public QElement(java.lang.String name, java.lang.String namespace)
name
- the element's name.public QElement(QName name)
name
- the element's name.public void setName(QName name)
name
- the element's name.public QName getQName()
getQName
in interface CauchoElement
getQName
in class QAbstractNode
public java.lang.String getNodeName()
getNodeName
in interface org.w3c.dom.Node
public java.lang.String getTagName()
getTagName
in interface org.w3c.dom.Element
public java.lang.String getLocalName()
getLocalName
in interface CauchoNode
getLocalName
in interface org.w3c.dom.Node
getLocalName
in class QAbstractNode
public java.lang.String getPrefix()
getPrefix
in interface CauchoNode
getPrefix
in interface org.w3c.dom.Node
getPrefix
in class QAbstractNode
public java.lang.String getCanonicalName()
getCanonicalName
in interface CauchoNode
getCanonicalName
in class QAbstractNode
public java.lang.String getNamespaceURI()
getNamespaceURI
in interface CauchoNode
getNamespaceURI
in interface org.w3c.dom.Node
getNamespaceURI
in class QAbstractNode
public java.lang.String getNamespace(java.lang.String prefix)
getNamespace
in interface CauchoElement
prefix
- the prefix to test.public short getNodeType()
getNodeType
in interface org.w3c.dom.Node
public org.w3c.dom.TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo
in interface org.w3c.dom.Element
public org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
getElementsByTagName
in interface org.w3c.dom.Element
public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String uri, java.lang.String name)
getElementsByTagNameNS
in interface org.w3c.dom.Element
public org.w3c.dom.Node appendChild(org.w3c.dom.Node child) throws org.w3c.dom.DOMException
appendChild
in interface org.w3c.dom.Node
appendChild
in class QNode
child
- the new child.org.w3c.dom.DOMException
public void normalize()
public boolean hasContent()
hasContent
in class QAbstractNode
public java.lang.String getTextValue()
getTextValue
in interface CauchoNode
getTextValue
in class QAbstractNode
public java.lang.String toString()
toString
in class java.lang.Object