public class BasicNode extends Object implements Node
| Constructor and Description |
|---|
BasicNode(Token token) |
BasicNode(XMLTokenizer.Type type,
String text) |
| Modifier and Type | Method and Description |
|---|---|
BasicNode |
copy()
Simulate clone()
|
BasicNode |
copy(Node orig)
Copy all data from
orig into this |
BasicNode |
createClone()
Simulate clone()
|
int |
getEndOffset() |
int |
getStartOffset()
The start offset of the node in the XML source or -1
|
Token |
getToken()
Get the token (mainly for error handling)
|
XMLTokenizer.Type |
getType()
Get the node type
|
String |
getValue() |
protected void |
setType(XMLTokenizer.Type type) |
void |
setValue(String value) |
String |
toString() |
String |
toXML()
Convert this node to a string.
|
static String |
toXML(Node n)
Helper method for
String toXML() to handle the
IOException that StringWriter
will never throw. |
BasicNode |
toXML(XMLWriter writer)
Append the content of this node to
writer |
public BasicNode(Token token)
public BasicNode(XMLTokenizer.Type type, String text)
protected void setType(XMLTokenizer.Type type)
public XMLTokenizer.Type getType()
Nodepublic Token getToken()
public int getStartOffset()
public int getEndOffset()
public String getValue()
public void setValue(String value)
public BasicNode toXML(XMLWriter writer) throws IOException
writertoXML in interface NodeIOExceptionpublic static String toXML(Node n)
String toXML() to handle the
IOException that StringWriter
will never throw.public BasicNode createClone()
NodecreateClone in interface Nodepublic BasicNode copy(Node orig)
Nodeorig into thisCopyright © 2008–2024. All rights reserved.