|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.twicom.qdparser.Element
public abstract class Element
This is the base class for the XML Elements.
Constructor Summary | |
---|---|
Element()
Class constructor. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
static Element |
newElement(java.lang.String value)
Creates a new TaggedElement or TextElement depending on the argument |
static java.lang.String |
quote(java.lang.String string)
quotes a string according to XML rules. |
java.lang.String |
toString(boolean formatted)
Returns formatted or unformatted XML source. |
protected abstract java.lang.StringBuffer |
toString(java.lang.StringBuffer sb,
boolean formatted,
int level)
Internal method used recursively to format XML with appropriate indentation. |
static java.lang.String |
unquote(java.lang.String string)
quotes a string according to XML rules. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Element()
Method Detail |
---|
public static Element newElement(java.lang.String value)
value
- the string to be turned into an element
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toString(boolean formatted)
formatted
- whether to return formatted XML source. If true, the source is
pretty-printed with new lines and indentation. If false, the XML
string is returned as one lone, unformatted line.
protected abstract java.lang.StringBuffer toString(java.lang.StringBuffer sb, boolean formatted, int level)
sb
- TODOformatted
- whether to return formatted XML source. If true, the source is
pretty-printed with new lines and indentation. If false, the XML
string is returned as one long, unformatted line.level
- the indentation level used to write leading spaces
public static java.lang.String quote(java.lang.String string)
string
- the string to process
public static java.lang.String unquote(java.lang.String string)
string
- the string to process
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |