4 |
|
//---IMPORTS--- |
5 |
|
import java.io.*; |
6 |
|
import java.util.ArrayList; |
7 |
– |
|
7 |
|
import org.xml.sax.*; |
8 |
|
import org.xml.sax.helpers.*; |
9 |
< |
import javax.xml.parsers.SAXParserFactory; |
11 |
< |
import javax.xml.parsers.ParserConfigurationException; |
12 |
< |
import javax.xml.parsers.SAXParser; |
9 |
> |
import javax.xml.parsers.*; |
10 |
|
|
11 |
|
/** |
12 |
|
* XMLStringParser - Used to assist in creating XMLPacket objects. |
43 |
|
|
44 |
|
//---PUBLIC METHODS--- |
45 |
|
|
49 |
– |
/** |
50 |
– |
* Accessor to the XMLPacket. |
51 |
– |
*/ |
52 |
– |
public XMLPacket getXMLPacket() { |
53 |
– |
return _packet; |
54 |
– |
} |
55 |
– |
|
46 |
|
//=========================================================== |
47 |
|
// SAX DocumentHandler methods |
48 |
|
//=========================================================== |
66 |
|
} |
67 |
|
} |
68 |
|
} |
69 |
< |
|
69 |
> |
|
70 |
|
/** |
71 |
|
* When an XML element is finished with, we must remove |
72 |
|
* the tag name from the tagList and decrement the indent |
76 |
|
_tagList.remove(_tagList.size() - 1); |
77 |
|
_indentLevel--; |
78 |
|
} |
79 |
< |
|
90 |
< |
|
79 |
> |
|
80 |
|
/** |
81 |
|
* Any text falling within a pair of terminal tags must |
82 |
|
* be added to the XMLPacket. Trim leading and trailing |
125 |
|
} |
126 |
|
|
127 |
|
//---ACCESSOR/MUTATOR METHODS--- |
128 |
+ |
|
129 |
+ |
/** |
130 |
+ |
* Accessor to the XMLPacket. |
131 |
+ |
*/ |
132 |
+ |
public XMLPacket getXMLPacket() { |
133 |
+ |
return _packet; |
134 |
+ |
} |
135 |
|
|
136 |
|
//---ATTRIBUTES--- |
137 |
|
|