org.gswing.utils.xml
Class XParser
java.lang.Object
org.gswing.utils.xml.XmlReader
org.gswing.utils.xml.XParser
public class XParser
- extends XmlReader
Class containing methods to convert dom document to a tree of XNodes (see class XNode)
Sequence -
XParser xp=new XParser();
xp.initDoc(xmlFileName);
XNode xn=xp.xmlToXNode();
and you have an XNode which is actually the root of a tree of XNodes.
implements MenuLoaderFace. (just for satisfying any later requirement for loose coupling)
- Version:
- 0.1, 08/06/2005
- Author:
- Prajeesh Kumar P
Constructor Summary |
XParser(String fname)
Initiates and loads the document with xml data from file fname |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XParser
public XParser(String fname)
- Initiates and loads the document with xml data from file fname
- Parameters:
fname
- Name of the xml file to load.
xmlToXNode
public XNode xmlToXNode()
- The XNode tree creator.
call this to get a tree of XNodes
recurseNode
public void recurseNode(Node e,
XNode xn)
- The recursive method for adding XNodes to the tree.
- Parameters:
e
- The xml node.xn
- The xnode.
Copyright © 2008. All Rights Reserved.