DTD_ATT_LIST_NODE, DTD_DECL_NODE, DTD_ELEMENT_DECL_NODE, DTD_ENTITY_DECL_NODE, DTD_NOTATION_DECL, NULL_VALUE
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 |
---|
DOMElement(int start,
int end) |
Modifier and Type | Method and Description |
---|---|
Integer |
endsWith(char c,
int startOffset)
Will traverse backwards from the start offset returning an offset of the
given character if it's found before another character.
|
Collection<String> |
getAllPrefixes() |
DOMAttr |
getAttributeNode(String name) |
DOMAttr |
getAttributeNodeNS(String arg0,
String arg1) |
String |
getAttributeNS(String arg0,
String arg1) |
NodeList |
getElementsByTagName(String arg0) |
NodeList |
getElementsByTagNameNS(String arg0,
String arg1) |
int |
getEndTagCloseOffset()
Returns the end tag close offset and
DOMNode.NULL_VALUE if it doesn't
exist. |
int |
getEndTagOpenOffset()
Returns the end tag open offset and
DOMNode.NULL_VALUE if it doesn't
exist. |
String |
getLocalName() |
String |
getNamespaceURI() |
String |
getNamespaceURI(String prefix)
Returns the namespace URI for the given prefix and null otherwise.
|
String |
getNodeName() |
short |
getNodeType() |
DOMElement |
getOrphanEndElement(int offset,
String tagName) |
String |
getPrefix() |
String |
getPrefix(String namespaceURI)
Returns the xmlns prefix from the given namespace URI and null otherwise.
|
TypeInfo |
getSchemaTypeInfo() |
int |
getStartTagCloseOffset()
Returns the start tag close offset and
DOMNode.NULL_VALUE if it
doesn't exist. |
int |
getStartTagOpenOffset()
Returns the start tag open offset and
DOMNode.NULL_VALUE if it
doesn't exist. |
String |
getTagName() |
int |
getUnclosedStartTagCloseOffset()
Returns the offset at which the given unclosed start tag should be closed with an angle bracket
|
boolean |
hasAttributeNS(String arg0,
String arg1) |
boolean |
hasEndTag()
Returns true if has an end tag.
|
boolean |
hasStartTag()
Returns true if has a start tag.
|
boolean |
hasTagName()
Returns true if the DOM element have a tag name and false otherwise (ex : '<'
or '').
|
boolean |
isClosed()
Returns true if element has a closing end tag (eg: ) and false
otherwise (eg: ).
|
boolean |
isDocumentElement() |
boolean |
isEmpty()
Returns true if the element is empty and false otherwise.
|
boolean |
isEndTagClosed()
If '>' exists in
|
boolean |
isInEndTag(int offset) |
boolean |
isInEndTag(int offset,
boolean afterBackSlash) |
boolean |
isInInsideStartEndTag(int offset) |
boolean |
isInStartTag(int offset) |
boolean |
isOrphanEndTag()
Returns true if the given element is an orphan end tag (which has no start
tag, eg: ) and false otherwise.
|
boolean |
isOrphanEndTagOf(String tagName)
Returns true if the given element is an orphan end tag (which has no start
tag, eg: ) of the given tag name and false otherwise.
|
boolean |
isSameTag(String tag)
Returns true if the given tag is the same tag of this element and false
otherwise.
|
boolean |
isSelfClosed() |
boolean |
isStartTagClosed()
If '>' exists in
|
void |
removeAttribute(String arg0) |
DOMAttr |
removeAttributeNode(Attr arg0) |
void |
removeAttributeNS(String arg0,
String arg1) |
DOMAttr |
setAttributeNode(Attr arg0) |
DOMAttr |
setAttributeNodeNS(Attr arg0) |
void |
setAttributeNS(String arg0,
String arg1,
String arg2) |
void |
setIdAttribute(String arg0,
boolean arg1) |
void |
setIdAttributeNode(Attr arg0,
boolean arg1) |
void |
setIdAttributeNS(String arg0,
String arg1,
boolean arg2) |
addChild, appendChild, cloneNode, compareDocumentPosition, findAttrAt, findAttrAt, findNodeAt, findNodeBefore, findNodeOrAttrAt, getAttribute, getAttributeAtIndex, getAttributeNode, getAttributeNodes, getAttributes, getBaseURI, getChild, getChildNodes, getChildren, getChildrenWithAttributeValue, getEnd, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousNonTextSibling, getPreviousSibling, getStart, getTextContent, getUserData, hasAttribute, hasAttributes, hasChildNodes, insertBefore, isAttribute, isCDATA, isCharacterData, isChildOfOwnerDocument, isComment, isDefaultNamespace, isDoctype, isDTDAttListDecl, isDTDElementDecl, isDTDEntityDecl, isDTDNotationDecl, isElement, isEqualNode, isGenericDTDDecl, isIncluded, isIncluded, isOwnerDocument, isProcessingInstruction, isProlog, isSameNode, isSupported, isText, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setAttributeNode, setNodeValue, setPrefix, setTextContent, setUserData, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttribute, hasAttribute, setAttribute
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public short getNodeType()
getNodeType
in interface Node
public String getNodeName()
getNodeName
in interface Node
public String getTagName()
getTagName
in interface Element
public boolean hasTagName()
public String getLocalName()
getLocalName
in interface Node
getLocalName
in class DOMNode
public String getPrefix()
public String getNamespaceURI()
getNamespaceURI
in interface Node
getNamespaceURI
in class DOMNode
public String getNamespaceURI(String prefix)
prefix
- the prefix.public Collection<String> getAllPrefixes()
public String getPrefix(String namespaceURI)
namespaceURI
- the namespacepublic boolean isDocumentElement()
public boolean isSelfClosed()
public Integer endsWith(char c, int startOffset)
public boolean isSameTag(String tag)
tag
- tag elementpublic boolean isInStartTag(int offset)
public boolean isInEndTag(int offset)
public boolean isInEndTag(int offset, boolean afterBackSlash)
public boolean isInInsideStartEndTag(int offset)
public int getStartTagOpenOffset()
DOMNode.NULL_VALUE
if it
doesn't exist.DOMNode.NULL_VALUE
if it
doesn't exist.public int getStartTagCloseOffset()
DOMNode.NULL_VALUE
if it
doesn't exist.DOMNode.NULL_VALUE
if it
doesn't exist.public int getEndTagOpenOffset()
DOMNode.NULL_VALUE
if it doesn't
exist.DOMNode.NULL_VALUE
if it doesn't
exist.public int getEndTagCloseOffset()
DOMNode.NULL_VALUE
if it doesn't
exist.DOMNode.NULL_VALUE
if it doesn't
exist.public boolean hasStartTag()
public boolean hasEndTag()
public boolean isStartTagClosed()
public boolean isEndTagClosed()
public boolean isOrphanEndTag()
public boolean isOrphanEndTagOf(String tagName)
tagName
- the end tag name.public int getUnclosedStartTagCloseOffset()
public DOMElement getOrphanEndElement(int offset, String tagName)
getOrphanEndElement
in class DOMNode
public boolean isClosed()
public String getAttributeNS(String arg0, String arg1) throws DOMException
getAttributeNS
in interface Element
DOMException
public DOMAttr getAttributeNode(String name)
getAttributeNode
in interface Element
getAttributeNode
in class DOMNode
public DOMAttr getAttributeNodeNS(String arg0, String arg1) throws DOMException
getAttributeNodeNS
in interface Element
DOMException
public NodeList getElementsByTagName(String arg0)
getElementsByTagName
in interface Element
public NodeList getElementsByTagNameNS(String arg0, String arg1) throws DOMException
getElementsByTagNameNS
in interface Element
DOMException
public TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo
in interface Element
public boolean hasAttributeNS(String arg0, String arg1) throws DOMException
hasAttributeNS
in interface Element
DOMException
public void removeAttribute(String arg0) throws DOMException
removeAttribute
in interface Element
DOMException
public void removeAttributeNS(String arg0, String arg1) throws DOMException
removeAttributeNS
in interface Element
DOMException
public DOMAttr removeAttributeNode(Attr arg0) throws DOMException
removeAttributeNode
in interface Element
DOMException
public void setAttributeNS(String arg0, String arg1, String arg2) throws DOMException
setAttributeNS
in interface Element
DOMException
public DOMAttr setAttributeNode(Attr arg0) throws DOMException
setAttributeNode
in interface Element
DOMException
public DOMAttr setAttributeNodeNS(Attr arg0) throws DOMException
setAttributeNodeNS
in interface Element
DOMException
public void setIdAttribute(String arg0, boolean arg1) throws DOMException
setIdAttribute
in interface Element
DOMException
public void setIdAttributeNS(String arg0, String arg1, boolean arg2) throws DOMException
setIdAttributeNS
in interface Element
DOMException
public void setIdAttributeNode(Attr arg0, boolean arg1) throws DOMException
setIdAttributeNode
in interface Element
DOMException
public boolean isEmpty()
Copyright © 2021. All rights reserved.