|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgist.hydrogen.Element
public class Element
The Element class decribes an Atom feed/entry as an XML tree
structure.
That is, it contains similar but subordinate Element objects
at a lower level. This is the first-developed version used only by the
Hydrogen project to convert an Atom feed into a nicely-formatted string.
The final, more extensive version XMLElem can be found in
the gist.protons package.
XMLElem| Field Summary | |
|---|---|
Attribute[] |
attr
Contains XML attributes as Attribute objects. |
java.lang.String |
data
Contains the content of the XML element. |
Element[] |
elem
Contains subordinate XML elements as Element objects |
java.lang.String |
tag
XML element's tag label |
| Constructor Summary | |
|---|---|
Element(java.io.DataInputStream in)
Contructs an Element object from an input file. |
|
Element(java.lang.String initTag,
Attribute[] initAttr,
java.lang.String initData,
Element[] initElem)
Constructs an Element object from initial data fields. |
|
| Method Summary | |
|---|---|
void |
setDoc()
Create default setting for an Atom feed document. |
java.lang.String |
strElement(int level)
Converts an XML element stored as an Element object into
a string in standard XML format. |
static java.lang.String |
timeStamp()
Returns the current date and time in standard format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String tag
public Attribute[] attr
Attribute objects.
Attributepublic java.lang.String data
data field is a null string if the XML element
contains a lower-level XML element.
public Element[] elem
Element objects
| Constructor Detail |
|---|
public Element(java.lang.String initTag,
Attribute[] initAttr,
java.lang.String initData,
Element[] initElem)
Element object from initial data fields.
Element(java.io.DataInputStream in) throws java.lang.Exception
Element object from an input file.
This constructor is used only for testing larger feed structure.
in - Must be written in a special syntax or exceptions will occur.
java.lang.Exception| Method Detail |
|---|
public void setDoc()
public java.lang.String strElement(int level)
Element object into
a string in standard XML format.
level - The level of the subordinate Element object
to be added to the returned string. This parameter is used only for
recursive purpose. The method should be called with level
equal to 0, indicating the root level of the tree structure.public static java.lang.String timeStamp()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||