com.adventnet.utilities.xml.sax
Class EXMLWriter

java.lang.Object
  |
  +--com.adventnet.utilities.xml.sax.EXMLWriter

public class EXMLWriter
extends java.lang.Object

Resonably generic parser with restrictions. Can be used only if there are no attributes used and there can be no levels of tag more than 2 Hello Note: Every thing is stored in a hashtable For the above xml file string will be stored as key with the value hello String will be stored as key with the values of in ValueObject as key and value String The starting tag is assumed to be always. So tag gets written always


Constructor Summary
EXMLWriter(java.lang.String fileName, java.util.Hashtable hash)
           
 
Method Summary
 java.lang.String getXMLContent()
          does a StringBuffer.append
static void main(java.lang.String[] args)
           
 void setRootTag(java.lang.String rootTag)
          set the rootTag of the XML file to be created.
 void write()
          calls getXMLContent() which does a StringBuffer.append and writes the content.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EXMLWriter

public EXMLWriter(java.lang.String fileName,
                  java.util.Hashtable hash)
Method Detail

getXMLContent

public java.lang.String getXMLContent()
does a StringBuffer.append

setRootTag

public void setRootTag(java.lang.String rootTag)
set the rootTag of the XML file to be created.

write

public void write()
           throws java.io.IOException
calls getXMLContent() which does a StringBuffer.append and writes the content.

main

public static void main(java.lang.String[] args)