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 fromorigintothisSimulate clone()intintThe start offset of the node in the XML source or -1getToken()Get the token (mainly for error handling)getType()Get the node typegetValue()protected voidsetType(XMLTokenizer.Type type) voidtoString()toXML()Convert this node to a string.static StringHelper method forString toXML()to handle theIOExceptionthatStringWriterwill 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:NodeGet 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:
toXMLin interfaceNode- Throws:
IOException
-
toXML
Convert this node to a string. -
toString
-
toXML
Helper method forString toXML()to handle theIOExceptionthatStringWriterwill never throw. -
createClone
Description copied from interface:NodeSimulate clone()- Specified by:
createClonein interfaceNode
-
copy
Description copied from interface:NodeCopy all data fromorigintothis -
copy
Description copied from interface:NodeSimulate clone()
-