Package de.pdark.decentxml
Class BasicNode
java.lang.Object
de.pdark.decentxml.BasicNode
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
Attribute
,Comment
,DocType
,DocTypeAttributeList
,DocTypeElement
,DocTypeEntity
,DocTypeNotation
,DocTypeText
,Entity
,ProcessingInstruction
,Text
The parent class for all nodes in the XML document.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Simulate clone()Copy all data fromorig
intothis
Simulate clone()int
int
The start offset of the node in the XML source or -1getToken()
Get the token (mainly for error handling)getType()
Get the node typegetValue()
protected void
setType
(XMLTokenizer.Type type) void
toString()
toXML()
Convert this node to a string.static String
Helper method forString toXML()
to handle theIOException
thatStringWriter
will never throw.Append the content of this node towriter
-
Field Details
-
token
-
type
-
value
-
-
Constructor Details
-
BasicNode
-
BasicNode
-
-
Method Details
-
setType
-
getType
Description copied from interface:Node
Get the node type -
getToken
Get the token (mainly for error handling) -
getStartOffset
public int getStartOffset()The start offset of the node in the XML source or -1 -
getEndOffset
public int getEndOffset() -
getValue
-
setValue
-
toXML
Append the content of this node towriter
- Specified by:
toXML
in interfaceNode
- Throws:
IOException
-
toXML
Convert this node to a string. -
toString
-
toXML
Helper method forString toXML()
to handle theIOException
thatStringWriter
will never throw. -
createClone
Description copied from interface:Node
Simulate clone()- Specified by:
createClone
in interfaceNode
-
copy
Description copied from interface:Node
Copy all data fromorig
intothis
-
copy
Description copied from interface:Node
Simulate clone()
-