ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/java/XMLFormatter.java
(Generate patch)

Comparing projects/cms/source/host/java/XMLFormatter.java (file contents):
Revision 1.1 by ab11, Mon Nov 27 19:44:00 2000 UTC vs.
Revision 1.3 by tdb, Thu Dec 7 23:22:17 2000 UTC

# Line 32 | Line 32 | class XMLFormatter {
32      * an example for rootInfo would be "Host"
33      */
34      public XMLFormatter(String rootInfo){
35
35          myStack = new Stack();
36          xmlData = new String();
37          xmlData = "<"+rootInfo+">";
# Line 49 | Line 48 | class XMLFormatter {
48          hostInfo = null;
49      }        
50  
51 +    /**
52 +    * Public Constructor for the class
53 +    * Takes a second parameter containing the root attributes.
54 +    */
55 +    public XMLFormatter(String rootInfo, String rootAttributes){
56 +        myStack = new Stack();
57 +        xmlData = new String();
58 +        xmlData = "<"+rootInfo+" "+rootAttributes+">";
59 +        hostInfo = rootInfo;
60 +    }
61  
62   //---PUBLIC METHODS---
63  
# Line 72 | Line 81 | class XMLFormatter {
81          xmlData += "<"+name+">";
82          myStack.push(name);
83      }
84 +
85 +    /**
86 +    * addString, adds a string into the XML packet no further processing is carried out
87 +    */
88 +    public void addString(String name){
89 +        xmlData += name;
90 +    }
91 +
92  
93      /**
94      * closeNest will close the currently opened nest (by writing </nest name> to

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines