|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.comedia.util.xml.CDefaultXmlElement
Presents a default XML element which can contain strings or other XML elements. This class does not perform any XML validation.
| Field Summary | |
protected java.util.ArrayList |
childs
The child element objects. |
protected java.util.Hashtable |
props
The element properties. |
protected java.lang.String |
tagName
The element tag name. |
| Constructor Summary | |
CDefaultXmlElement()
Constructs this class with default properties. |
|
CDefaultXmlElement(java.lang.String tagName)
Constructs this class and assignes tag name. |
|
| Method Summary | |
void |
clear()
Clears the content of this element and restores an initial state. |
CXmlElement |
createChildElement(java.lang.String tagName)
Creates a child element to this one. |
protected java.lang.String |
createIndent(int indent)
Creates an indent string. |
void |
parseChildElements(CXmlScanner scanner)
Parses child elements from input stream. |
void |
parseElement(CXmlScanner scanner)
Parses this element from input stream. |
void |
writeChildElements(java.io.Writer out,
int indent)
Writes child elements of this element to output stream. |
void |
writeElement(java.io.Writer out,
int indent)
Writes this element from output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String tagName
protected java.util.Hashtable props
protected java.util.ArrayList childs
| Constructor Detail |
public CDefaultXmlElement()
public CDefaultXmlElement(java.lang.String tagName)
tagName - a name of element tag.| Method Detail |
public void clear()
clear in interface CXmlElement
public void parseElement(CXmlScanner scanner)
throws CXmlException
parseElement in interface CXmlElementscanner - lexical scanner to parse XML.
public void parseChildElements(CXmlScanner scanner)
throws CXmlException
parseChildElements in interface CXmlElementscanner - lexical scanner to parse XML.protected java.lang.String createIndent(int indent)
indent - number of white spaces in the indent.
public void writeElement(java.io.Writer out,
int indent)
throws java.io.IOException
writeElement in interface CXmlElementoutput - stream to write this element and all contents.indent - number of indent spaces.
public void writeChildElements(java.io.Writer out,
int indent)
throws java.io.IOException
writeChildElements in interface CXmlElementoutput - stream to write child elemens.indent - number of indent spaces.public CXmlElement createChildElement(java.lang.String tagName)
createChildElement in interface CXmlElementtagName - a name of element tag.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||