public abstract class XMLNode extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ATTRIBUTE
Node is an attribute.
|
static int |
ELEMENT
Node is an element.
|
static int |
PROCESSING_INSTRUCTION
Node is a processing instruction.
|
static int |
ROOT
Node is a root node.
|
static int |
TEXT
Node is a text node.
|
Modifier and Type | Method and Description |
---|---|
String |
getLocalName()
Returns the local name of the node.
|
String |
getNamespaceURI()
Returns the namespace URI the node.
|
String |
getNamespaceURI(String prefix)
Returns the namespace URI associated with this namespace prefix, as
defined in the context of this node.
|
String |
getNodeLocation()
Finds and returns the location of this node in its root's tree.
|
int |
getNodeType()
Returns the type of this node.
|
ParentNode |
getParentNode()
Returns the parent node, or null if the node has no parent.
|
XMLNode |
getRootNode()
Returns the root node.
|
abstract String |
getStringValue()
Returns the string value of the node.
|
protected String |
getXPath()
Returns the XPath from the root node to this node.
|
void |
setNamespace(String namespace)
Sets the namespace URI for this XMLNode.
|
public static final int ROOT
public static final int ELEMENT
public static final int ATTRIBUTE
public static final int TEXT
public static final int PROCESSING_INSTRUCTION
public final int getNodeType()
public String getLocalName()
public String getNamespaceURI()
public ParentNode getParentNode()
public XMLNode getRootNode()
public abstract String getStringValue()
public String getNamespaceURI(String prefix)
prefix
- The namespace prefixpublic void setNamespace(String namespace)
namespace
- the Namespace URIpublic String getNodeLocation()
protected String getXPath()
Copyright © 2018. All rights reserved.