sunlabs.brazil.sunlabs
public class XmlTree extends Dictionary implements PropertiesCacheManager.Saveable
Nested Class Summary | |
---|---|
static class | XmlTree.DefaultNodeName
The node is named by the specified attribute. |
static class | XmlTree.IllegalXmlException
Do some more reasonable error handling. |
static class | XmlTree.Node
This describes a node of the XML tree |
interface | XmlTree.NodeName |
static class | XmlTree.XmlErrorInfo |
Constructor Summary | |
---|---|
XmlTree()
Make an empty tree. | |
XmlTree(String src)
Given an XML string, build the tree. |
Method Summary | |
---|---|
Enumeration | elements() |
static void | elements(XmlTree.Node n, Vector v) |
Object | get(Object k)
Given a node description, return the value, if any.
|
static String | getFile(String s) |
static String | getFile(InputStream in) |
String | getPart(String s)
Given a node descriptor, return the result. |
XmlTree.Node | getRoot() |
Hashtable | getTags() |
boolean | isEmpty() |
Enumeration | keys() |
void | keys(XmlTree.Node n, String prefix, String delim, Vector v) |
void | load(InputStream in) |
static void | main(String[] args) |
Vector | match(String pattern)
Find all nodes that match a glob pattern, starting at the root. |
void | match(XmlTree.Node node, StringTokenizer st, Vector results)
Find all nodes that match a glob pattern, starting at any node. |
Object | put(Object k, Object v) |
Object | remove(Object o) |
void | replace(String src)
Replace the XmlTree with new markup. |
void | save(OutputStream out, String header) |
XmlTree.Node | search(String s)
Find a node in the tree by name, starting at the root. |
XmlTree.Node | search(XmlTree.Node node, StringTokenizer st)
Find a node in the tree by name, starting under any node. |
boolean | setAttribute(String name, String key, String value) |
boolean | setCdata(String name, String data) |
void | setComparator(XmlTree.NodeName nodeName)
Set the class that determines a node's name.
|
void | setDelim(String delim)
set the node delimiter. |
boolean | setDflt(String dflt) |
void | setIdent(String ident) |
void | setPrefix(String prefix)
set the name of this tree |
void | setTag(String tag)
Add an element to the tag process list.
|
void | setTags(Hashtable tags)
Set the list of tags to process |
int | size() |
String | toString() Print a tree |
void | toString(XmlTree.Node node, StringBuffer sb, int level) |
Parameters: src: the xml data
Parameters: s The node pathname
Returns: The node, if found, or null
Parameters: node: The starting node sb: where to append the results to level: the nesting level