uk.ac.kcl.cch.jb.xmlWriter
Class XmlElement

java.lang.Object
  extended byuk.ac.kcl.cch.jb.xmlWriter.XmlElement

public class XmlElement
extends Object

allows for the creation of an XML element in the writing of an XML file by XmlFile.

Author:
John Bradley

Constructor Summary
XmlElement(String name)
           
 
Method Summary
 void addAttribute(String name, String value)
           
 void addComment(String string)
           
 void addContent(String string)
           
 void addContent(XmlElement content)
           
 void close()
           
 String makeXMLAttribute(String val)
           
protected static String update(String pat, char match, String repl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlElement

public XmlElement(String name)
Method Detail

addAttribute

public void addAttribute(String name,
                         String value)
                  throws IOException
Throws:
IOException

addContent

public void addContent(XmlElement content)
                throws IOException
Throws:
IOException

addContent

public void addContent(String string)
                throws IOException
Throws:
IOException

addComment

public void addComment(String string)
                throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

update

protected static String update(String pat,
                               char match,
                               String repl)

makeXMLAttribute

public String makeXMLAttribute(String val)