|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.pdark.decentxml.BasicNode
de.pdark.decentxml.Attribute
public class Attribute
This class represents an attribute of an Element
Element
Constructor Summary | |
---|---|
Attribute(java.lang.String name,
java.lang.String value)
Create an attribute with a certain name and value. |
|
Attribute(java.lang.String name,
java.lang.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(java.lang.String name,
java.lang.String value,
Namespace namespace)
Create an attribute with a certain name and value. |
|
Attribute(java.lang.String name,
java.lang.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. |
Method Summary | |
---|---|
static char |
checkQuoteChar(java.lang.String value,
char quoteChar)
|
Attribute |
copy()
Simulate clone() |
Attribute |
copy(Node orig)
Copy all data from orig into this |
Attribute |
createClone()
Simulate clone() |
java.lang.String |
getEqualsSpace()
|
java.lang.String |
getName()
Return the name of the attribute |
Namespace |
getNamespace()
|
java.lang.String |
getPreSpace()
|
int |
getQuoteChar()
|
java.lang.String |
getValue()
Return the value of the attribute |
Attribute |
setEqualsSpace(java.lang.String equalsSpace)
|
void |
setName(java.lang.String name)
|
void |
setNamespace(Namespace namespace)
|
Attribute |
setPreSpace(java.lang.String preSpace)
|
Attribute |
setQuoteChar(char quoteChar)
|
void |
setValue(java.lang.String value)
|
BasicNode |
toXML(XMLWriter writer)
Append the content of this node to writer |
Methods inherited from class de.pdark.decentxml.BasicNode |
---|
getEndOffset, getStartOffset, getToken, getType, setType, toString, toXML, toXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Attribute(Token token)
The token must include the space before the name and end with the closing quote.
token
- public Attribute(java.lang.String name, java.lang.String value)
The quote to use is determined automatically depending on the content of the value
public Attribute(java.lang.String name, java.lang.String value, Namespace namespace)
The quote to use is determined automatically depending on the content of the value
public Attribute(java.lang.String name, java.lang.String value, char quoteChar)
If the quote character exists in the value, it is ignored.
public Attribute(java.lang.String name, java.lang.String value, Namespace namespace, char quoteChar)
If the quote character exists in the value, it is ignored.
Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getValue()
getValue
in class BasicNode
public void setValue(java.lang.String value)
setValue
in class BasicNode
public Namespace getNamespace()
public void setNamespace(Namespace namespace)
public int getQuoteChar()
public Attribute setQuoteChar(char quoteChar)
public java.lang.String getPreSpace()
public Attribute setPreSpace(java.lang.String preSpace)
public java.lang.String getEqualsSpace()
public Attribute setEqualsSpace(java.lang.String equalsSpace)
public static char checkQuoteChar(java.lang.String value, char quoteChar)
public BasicNode toXML(XMLWriter writer) throws java.io.IOException
BasicNode
writer
toXML
in interface Node
toXML
in class BasicNode
java.io.IOException
public Attribute createClone()
Node
createClone
in interface Node
createClone
in class BasicNode
public Attribute copy(Node orig)
Node
orig
into this
copy
in interface Node
copy
in class BasicNode
public Attribute copy()
Node
copy
in interface Node
copy
in class BasicNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |