public class QElement extends QAttributedNode implements CauchoElement
QNode.ChildNodeList_firstChild, _lastChildLATTRIBUTE_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,
javax.xml.namespace.QName name) |
|
QElement(javax.xml.namespace.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.
|
javax.xml.namespace.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(javax.xml.namespace.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, unlinkcheckValid, getChildNodes, getFirstChild, getLastChild, getNextPreorder, getNextSibling, getNodeValue, getPreviousSibling, hasChildNodes, insertBefore, removeChild, replaceChild, setNodeValue, setTextContentbaseURI, 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, supportsclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFirstAttributegetAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNScheckValid, getBaseURI, getColumn, getFilename, getLine, print, printHtml, printPretty, setLocationcloneNode, 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, setUserDatapublic 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(javax.xml.namespace.QName name)
name - the element's name.protected QElement(QDocument owner, javax.xml.namespace.QName name)
public void setName(javax.xml.namespace.QName name)
name - the element's name.public javax.xml.namespace.QName getQName()
getQName in interface CauchoElementgetQName in class QAbstractNodepublic java.lang.String getNodeName()
getNodeName in interface org.w3c.dom.Nodepublic java.lang.String getTagName()
getTagName in interface org.w3c.dom.Elementpublic java.lang.String getLocalName()
getLocalName in interface CauchoNodegetLocalName in interface org.w3c.dom.NodegetLocalName in class QAbstractNodepublic java.lang.String getPrefix()
getPrefix in interface CauchoNodegetPrefix in interface org.w3c.dom.NodegetPrefix in class QAbstractNodepublic java.lang.String getCanonicalName()
getCanonicalName in interface CauchoNodegetCanonicalName in class QAbstractNodepublic java.lang.String getNamespaceURI()
getNamespaceURI in interface CauchoNodegetNamespaceURI in interface org.w3c.dom.NodegetNamespaceURI in class QAbstractNodepublic java.lang.String getNamespace(java.lang.String prefix)
getNamespace in interface CauchoElementprefix - the prefix to test.public short getNodeType()
getNodeType in interface org.w3c.dom.Nodepublic org.w3c.dom.TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface org.w3c.dom.Elementpublic org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
getElementsByTagName in interface org.w3c.dom.Elementpublic org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String uri,
java.lang.String name)
getElementsByTagNameNS in interface org.w3c.dom.Elementpublic org.w3c.dom.Node appendChild(org.w3c.dom.Node child)
throws org.w3c.dom.DOMException
appendChild in interface org.w3c.dom.NodeappendChild in class QNodechild - the new child.org.w3c.dom.DOMExceptionpublic void normalize()
public boolean hasContent()
hasContent in class QAbstractNodepublic java.lang.String getTextValue()
getTextValue in interface CauchoNodegetTextValue in class QAbstractNodepublic java.lang.String toString()
toString in class java.lang.Object