util
Class SimpleXML
java.lang.Object
|
+--util.SimpleXML
- public class SimpleXML
- extends Object
A class which uses XML transformations to easily create and parse
text representations of data. Can handle nested Maps,
Lists, Dates, and primitive elements (numeric or string).
For reference, the SimpleXML format defines the following tags:
<list> | Designates a List |
<el> | Indicates an element of the list |
<map> | Designates a Map |
<mapentry> | Indicates an element of the Map. |
<mapkey> | The key of the map entry. |
<mapval> | The value of the map entry. |
<date> | Empty tag for a Date. The `val' attribute contains a text representation of the date. |
<null> | Empty tag for representing `null' |
- See Also:
Date
,
List
,
Map
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleXML
public SimpleXML()
main
public static void main(String[] argv)
- Main program -- takes a filename and unpacks the information in it.
processDOMNode
public static Object processDOMNode(org.w3c.dom.Node node)
packObject
public static String packObject(Object spo)
packObjectWithPrefix
public static String packObjectWithPrefix(Object spo,
String prefix)
joinTags
protected static String joinTags(String text1,
String text2,
String prefix)
unpackObject
public static Object unpackObject(InputStream input)