Class Attribute
java.lang.Object
de.pdark.decentxml.BasicNode
de.pdark.decentxml.Attribute
- All Implemented Interfaces:
Node
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate an attribute from a Token.Create an attribute with a certain name and value.Create an attribute with a certain name and value plus a preference for the quote character that should be used.Create an attribute with a certain name and value.Create an attribute with a certain name and value plus a preference for the quote character that should be used. -
Method Summary
Modifier and TypeMethodDescriptionstatic charcheckQuoteChar(String value, char quoteChar) copy()Simulate clone()Copy all data fromorigintothisSimulate clone()getName()Return the name of the attributeintgetValue()Return the value of the attributesetEqualsSpace(String equalsSpace) voidvoidsetNamespace(Namespace namespace) setPreSpace(String preSpace) setQuoteChar(char quoteChar) voidAppend the content of this node towriterMethods inherited from class BasicNode
getEndOffset, getStartOffset, getToken, getType, setType, toString, toXML, toXML
-
Field Details
-
namespace
-
preSpace
Space before the name -
name
-
equalsSpace
Space around the equals sign (incl. the sign) -
rawValue
-
value
-
quoteChar
private char quoteChar
-
-
Constructor Details
-
Attribute
Create an attribute from a Token.The token must include the space before the name and end with the closing quote.
- Parameters:
token-
-
Attribute
-
Attribute
-
Attribute
-
Attribute
-
-
Method Details
-
getName
Return the name of the attribute -
setName
-
getValue
-
setValue
-
getNamespace
-
setNamespace
-
getQuoteChar
public int getQuoteChar() -
setQuoteChar
-
getPreSpace
-
setPreSpace
-
getEqualsSpace
-
setEqualsSpace
-
checkQuoteChar
-
toXML
-
createClone
Description copied from interface:NodeSimulate clone()- Specified by:
createClonein interfaceNode- Overrides:
createClonein classBasicNode
-
copy
-
copy
-