| 5 |
|
|
| 6 |
|
/** |
| 7 |
|
* Formats data into valid XML |
| 8 |
< |
* By calling either addElement() or addNest() you can use this |
| 9 |
< |
* class to create valid xml. When all elements have been added |
| 10 |
< |
* calling returnXML() will return a string containing the xml. |
| 8 |
> |
* By calling either addElement() or addNest() you can use |
| 9 |
> |
* this class to create valid xml. When all elements have |
| 10 |
> |
* been added calling returnXML() will return a string |
| 11 |
> |
* containing the xml. |
| 12 |
|
* |
| 13 |
|
* |
| 14 |
|
* @author $Author$ |
| 61 |
|
xmlData = new String(); |
| 62 |
|
hostInfo = null; |
| 63 |
|
} |
| 63 |
– |
|
| 64 |
– |
/** |
| 65 |
– |
* Public Constructor for the class |
| 66 |
– |
* Takes a second parameter containing the root attributes. |
| 67 |
– |
*/ |
| 68 |
– |
public XMLFormatter(String rootInfo, String rootAttributes){ |
| 69 |
– |
myStack = new Stack(); |
| 70 |
– |
xmlData = new String(); |
| 71 |
– |
xmlData = "<"+rootInfo+" "+rootAttributes+">"; |
| 72 |
– |
hostInfo = rootInfo; |
| 73 |
– |
} |
| 64 |
|
|
| 65 |
|
//---PUBLIC METHODS--- |
| 66 |
|
|