org.oreodata.xml
Class XMLOutput
java.lang.Object
|
+--org.oreodata.xml.XMLOutput
- public class XMLOutput
- extends java.lang.Object
Method Summary |
static java.lang.String |
convertToEntities(java.lang.String s)
|
void |
outputXML(java.io.Writer writer,
java.util.Collection recs,
java.lang.String elementName,
java.util.Map atts,
boolean recurse)
utility routine to output a set of records to
a character stream in XML format. |
void |
outputXML(java.io.Writer writer,
DataEvent event)
|
void |
outputXML(java.io.Writer writer,
Record rec,
boolean recurse)
utility routine to output a record as an XML element
to a character stream. |
java.lang.String |
toXML(Record rec)
Utility routine to turn a Record into an
XML-formatted string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TIMESTAMP_FORMAT
public static final java.text.DateFormat TIMESTAMP_FORMAT
XMLOutput
public XMLOutput()
XMLOutput
public XMLOutput(int indentation)
outputXML
public void outputXML(java.io.Writer writer,
DataEvent event)
throws java.io.IOException
java.io.IOException
outputXML
public void outputXML(java.io.Writer writer,
java.util.Collection recs,
java.lang.String elementName,
java.util.Map atts,
boolean recurse)
throws java.io.IOException
- utility routine to output a set of records to
a character stream in XML format.
- Parameters:
writer
- the character stream to write to.recs
- the records to write.elementName
- The name of the element to enclose the set of records in (may be null)atts
- a hashtable of attributes (key/value) pairsrecurse
- whether to write out the record's children recursively (if this applies)
java.io.IOException
outputXML
public void outputXML(java.io.Writer writer,
Record rec,
boolean recurse)
throws java.io.IOException
- utility routine to output a record as an XML element
to a character stream.
java.io.IOException
convertToEntities
public static java.lang.String convertToEntities(java.lang.String s)
toXML
public java.lang.String toXML(Record rec)
- Utility routine to turn a Record into an
XML-formatted string.