| Constructor and Description |
|---|
Attribute(String name,
String value)
Create an attribute with a certain name and value.
|
Attribute(String name,
String value,
char quoteChar)
Create an attribute with a certain name and value plus a preference
for the quote character that should be used.
|
Attribute(String name,
String value,
Namespace namespace)
Create an attribute with a certain name and value.
|
Attribute(String name,
String value,
Namespace namespace,
char quoteChar)
Create an attribute with a certain name and value plus a preference
for the quote character that should be used.
|
Attribute(Token token)
Create an attribute from a Token.
|
| Modifier and Type | Method and Description |
|---|---|
static char |
checkQuoteChar(String value,
char quoteChar) |
Attribute |
copy()
Simulate clone()
|
Attribute |
copy(Node orig)
Copy all data from
orig into this |
Attribute |
createClone()
Simulate clone()
|
String |
getEqualsSpace() |
String |
getName()
Return the name of the attribute
|
Namespace |
getNamespace() |
String |
getPreSpace() |
int |
getQuoteChar() |
String |
getValue()
Return the value of the attribute
|
Attribute |
setEqualsSpace(String equalsSpace) |
void |
setName(String name) |
void |
setNamespace(Namespace namespace) |
Attribute |
setPreSpace(String preSpace) |
Attribute |
setQuoteChar(char quoteChar) |
void |
setValue(String value) |
BasicNode |
toXML(XMLWriter writer)
Append the content of this node to
writer |
getEndOffset, getStartOffset, getToken, getType, setType, toString, toXML, toXMLpublic Attribute(Token token)
The token must include the space before the name and end with the closing quote.
token - public Attribute(String name, String value)
The quote to use is determined automatically depending on the content of the value
public Attribute(String name, String value, Namespace namespace)
The quote to use is determined automatically depending on the content of the value
public Attribute(String name, String value, char quoteChar)
If the quote character exists in the value, it is ignored.
public String getName()
public void setName(String name)
public String getValue()
public Namespace getNamespace()
public void setNamespace(Namespace namespace)
public int getQuoteChar()
public Attribute setQuoteChar(char quoteChar)
public String getPreSpace()
public String getEqualsSpace()
public static char checkQuoteChar(String value, char quoteChar)
public BasicNode toXML(XMLWriter writer) throws IOException
BasicNodewritertoXML in interface NodetoXML in class BasicNodeIOExceptionpublic Attribute createClone()
NodecreateClone in interface NodecreateClone in class BasicNodepublic Attribute copy(Node orig)
Nodeorig into thisCopyright © 2008–2025. All rights reserved.