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

Inner Class Summary
static interface SimpleXML.Packable
           
 
Constructor Summary
SimpleXML()
           
 
Method Summary
protected static String joinTags(String text1, String text2, String prefix)
           
static void main(String[] argv)
          Main program -- takes a filename and unpacks the information in it.
static String packObject(Object spo)
           
static String packObjectWithPrefix(Object spo, String prefix)
           
static Object processDOMNode(org.w3c.dom.Node node)
           
static Object unpackObject(InputStream input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleXML

public SimpleXML()
Method Detail

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)