| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<XMLAttribute> |
attributes |
protected LinkedList<XMLNode> |
children |
protected String |
localName |
protected String |
prefix |
protected Map<String,String> |
prefixToURI |
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| Constructor and Description |
|---|
XMLElement(XMLDocument doc,
String prefix,
String localName)
Constructor.
|
XMLElement(XMLDocument doc,
XMLStreamEvents.ElementContext context)
Constructor.
|
cloned, compareDocumentPosition, getBaseURI, getFeature, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getUserData, isAncestor, isEqualNode, isSameNode, isSupported, setNodeValue, setParent, setUserDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompareDocumentPosition, getBaseURI, getFeature, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getUserData, isEqualNode, isSameNode, isSupported, setNodeValue, setUserDataprotected String prefix
protected String localName
protected LinkedList<XMLAttribute> attributes
protected LinkedList<XMLNode> children
public XMLElement(XMLDocument doc, String prefix, String localName)
public XMLElement(XMLDocument doc, XMLStreamEvents.ElementContext context)
public XMLElement cloneNode(boolean deep)
public short getNodeType()
getNodeType in interface Nodepublic String getNodeName()
getNodeName in interface Nodepublic String getTagName()
getTagName in interface Elementpublic String getLocalName()
getLocalName in interface NodegetLocalName in class XMLNodepublic String getPrefix()
public void setPrefix(String prefix) throws DOMException
setPrefix in interface NodesetPrefix in class XMLNodeDOMExceptionpublic String getNamespaceURI()
getNamespaceURI in interface NodegetNamespaceURI in class XMLNodepublic XMLNode appendChild(Node newChild) throws DOMException
appendChild in interface NodeappendChild in class XMLNodeDOMExceptionpublic XMLNode insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore in interface NodeinsertBefore in class XMLNodeDOMExceptionpublic XMLNode removeChild(Node oldChild) throws DOMException
removeChild in interface NoderemoveChild in class XMLNodeDOMExceptionpublic XMLNode replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild in interface NodereplaceChild in class XMLNodeDOMExceptionpublic Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class XMLNodepublic Node getLastChild()
getLastChild in interface NodegetLastChild in class XMLNodepublic boolean hasChildNodes()
hasChildNodes in interface NodehasChildNodes in class XMLNodepublic NodeList getChildNodes()
getChildNodes in interface NodegetChildNodes in class XMLNodepublic boolean hasAttributes()
hasAttributes in interface NodehasAttributes in class XMLNodepublic boolean hasAttribute(String name)
hasAttribute in interface Elementpublic NamedNodeMap getAttributes()
getAttributes in interface NodegetAttributes in class XMLNodepublic String getAttribute(String name)
getAttribute in interface Elementpublic void setAttribute(String name, String value) throws DOMException
setAttribute in interface ElementDOMExceptionpublic void removeAttribute(String name) throws DOMException
removeAttribute in interface ElementDOMExceptionpublic XMLAttribute getAttributeNode(String name)
getAttributeNode in interface Elementpublic XMLAttribute setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode in interface ElementDOMExceptionpublic XMLAttribute removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode in interface ElementDOMExceptionpublic boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException
hasAttributeNS in interface ElementDOMExceptionpublic String getAttributeNS(String namespaceURI, String localName) throws DOMException
getAttributeNS in interface ElementDOMExceptionpublic void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
setAttributeNS in interface ElementDOMExceptionpublic void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS in interface ElementDOMExceptionpublic XMLAttribute getAttributeNodeNS(String namespaceURI, String localName) throws DOMException
getAttributeNodeNS in interface ElementDOMExceptionpublic XMLAttribute setAttributeNodeNS(Attr newAttr) throws DOMException
setAttributeNodeNS in interface ElementDOMExceptionpublic void setIdAttribute(String name, boolean isId) throws DOMException
setIdAttribute in interface ElementDOMExceptionpublic void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
setIdAttributeNS in interface ElementDOMExceptionpublic void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
setIdAttributeNode in interface ElementDOMExceptionpublic void addAttribute(XMLAttribute a)
public String getPrefixForNamespaceURI(String namespaceURI)
public String lookupPrefix(String namespaceURI)
lookupPrefix in interface NodelookupPrefix in class XMLNodepublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface NodeisDefaultNamespace in class XMLNodepublic String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface NodelookupNamespaceURI in class XMLNodepublic void declareNamespace(String uri, String prefix)
public NodeList getElementsByTagName(String name)
getElementsByTagName in interface Elementprotected void getElementsByTagName(String namespaceURI, String localName, List<XMLNode> result)
public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException
getElementsByTagNameNS in interface ElementDOMExceptionpublic TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface Elementpublic String getTextContent()
getTextContent in interface Nodepublic void setTextContent(String textContent)
setTextContent in interface Nodepublic void normalize()
public static XMLElement create(XMLDocument doc, XMLStreamEventsSync stream) throws XMLException, IOException, IllegalStateException
public static AsyncWork<XMLElement,Exception> create(XMLDocument doc, XMLStreamEventsAsync stream) throws IllegalStateException
IllegalStateExceptionpublic void parseContent(XMLStreamEventsSync stream) throws XMLException, IOException
XMLExceptionIOExceptionpublic ISynchronizationPoint<Exception> parseContent(XMLStreamEventsAsync stream)
Copyright © 2018. All rights reserved.