public abstract class DOMNode extends Object implements Node, DOMRange
Modifier and Type | Field and Description |
---|---|
static short |
DTD_ATT_LIST_NODE
The node is a
DTD Attribute List . |
static short |
DTD_DECL_NODE
The node is a generic
DTD Decl Node . |
static short |
DTD_ELEMENT_DECL_NODE
The node is a
DTD Element Declaration . |
static short |
DTD_ENTITY_DECL_NODE
The node is a
DTD Entity Declaraction . |
static short |
DTD_NOTATION_DECL
The node is a
DTD Notation Declaraction . |
static int |
NULL_VALUE
Null value used for offset.
|
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 |
---|
DOMNode(int start,
int end) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNodeName, getNodeType
public static final int NULL_VALUE
public static final short DTD_ELEMENT_DECL_NODE
DTD Element Declaration
.public static final short DTD_ATT_LIST_NODE
DTD Attribute List
.public static final short DTD_ENTITY_DECL_NODE
DTD Entity Declaraction
.public static final short DTD_NOTATION_DECL
DTD Notation Declaraction
.public static final short DTD_DECL_NODE
DTD Decl Node
.public DOMDocument getOwnerDocument()
getOwnerDocument
in interface DOMRange
getOwnerDocument
in interface Node
public DOMNode findNodeBefore(int offset)
public DOMNode findNodeAt(int offset)
public static boolean isIncluded(DOMRange node, int offset)
node
- offset
- public static boolean isIncluded(int start, int end, int offset)
public DOMAttr findAttrAt(int offset)
public static DOMNode findNodeOrAttrAt(DOMDocument document, int offset)
public DOMAttr getAttributeNode(String prefix, String suffix)
public DOMAttr getAttributeAtIndex(int index)
index
- Starting at 0, index of attribute you wantpublic boolean hasAttribute(String name)
public boolean hasAttributes()
hasAttributes
in interface Node
public void setAttributeNode(DOMAttr attr)
public List<DOMNode> getChildrenWithAttributeValue(String name, String value)
name
- name of attributevalue
- value of attributepublic List<DOMNode> getChildren()
public void addChild(DOMNode child)
this
child
- the node child to add.public DOMNode getChild(int index)
index
- public boolean isClosed()
public DOMElement getParentElement()
public boolean isComment()
public boolean isProcessingInstruction()
public boolean isProlog()
public boolean isCDATA()
public boolean isDoctype()
public boolean isGenericDTDDecl()
public boolean isElement()
public boolean isAttribute()
public boolean isText()
public boolean isCharacterData()
public boolean isDTDElementDecl()
public boolean isDTDAttListDecl()
public boolean isDTDEntityDecl()
public boolean isDTDNotationDecl()
public boolean isOwnerDocument()
public boolean isChildOfOwnerDocument()
public int getStart()
DOMRange
public int getEnd()
DOMRange
public String getLocalName()
getLocalName
in interface Node
public DOMNode getParentNode()
getParentNode
in interface Node
public DOMNode getFirstChild()
getFirstChild
in interface Node
public DOMNode getLastChild()
getLastChild
in interface Node
public NamedNodeMap getAttributes()
getAttributes
in interface Node
public NodeList getChildNodes()
getChildNodes
in interface Node
public Node appendChild(Node newChild) throws DOMException
appendChild
in interface Node
DOMException
public short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition
in interface Node
DOMException
public String getBaseURI()
getBaseURI
in interface Node
public Object getFeature(String arg0, String arg1)
getFeature
in interface Node
public String getNamespaceURI()
getNamespaceURI
in interface Node
public DOMNode getNextSibling()
getNextSibling
in interface Node
public String getNodeValue() throws DOMException
getNodeValue
in interface Node
DOMException
public DOMNode getPreviousSibling()
getPreviousSibling
in interface Node
public DOMNode getPreviousNonTextSibling()
public DOMElement getOrphanEndElement(int offset, String tagName)
public String getTextContent() throws DOMException
getTextContent
in interface Node
DOMException
public Object getUserData(String arg0)
getUserData
in interface Node
public boolean hasChildNodes()
hasChildNodes
in interface Node
public Node insertBefore(Node arg0, Node arg1) throws DOMException
insertBefore
in interface Node
DOMException
public boolean isDefaultNamespace(String arg0)
isDefaultNamespace
in interface Node
public boolean isEqualNode(Node arg0)
isEqualNode
in interface Node
public boolean isSameNode(Node arg0)
isSameNode
in interface Node
public boolean isSupported(String arg0, String arg1)
isSupported
in interface Node
public String lookupNamespaceURI(String arg0)
lookupNamespaceURI
in interface Node
public String lookupPrefix(String arg0)
lookupPrefix
in interface Node
public Node removeChild(Node arg0) throws DOMException
removeChild
in interface Node
DOMException
public Node replaceChild(Node arg0, Node arg1) throws DOMException
replaceChild
in interface Node
DOMException
public void setNodeValue(String arg0) throws DOMException
setNodeValue
in interface Node
DOMException
public void setPrefix(String arg0) throws DOMException
setPrefix
in interface Node
DOMException
public void setTextContent(String arg0) throws DOMException
setTextContent
in interface Node
DOMException
public Object setUserData(String arg0, Object arg1, UserDataHandler arg2)
setUserData
in interface Node
Copyright © 2021. All rights reserved.