sfi.director.util.XmlCreator Class Reference

List of all members.

Detailed Description

create simple XML text documents.

Since we are using GCJ/classpath with broken SAXTransformer support we implement our own, simplified method.


Public Member Functions

 XmlCreator () throws DirectorException
void startElement (String localName, Attributes atts)
 start an element.
void endElement (String localName)
 end an element.
void characters (char[] ch, int start, int length)
 add element contents.
void addEncode (char[] ch, int start, int length)
 add text.
void addEncode (char[] ch)
 add text.
void addEncode (String st)
 add text.
void addRaw (String st)
 add raw text.
String text ()
 get the text representation of the current document.
void setRaw (String newText)

Static Public Member Functions

static String encode (char[] ch, int start, int length)
static String encode (String text)

Package Attributes

StringBuffer text = new StringBuffer()


Constructor & Destructor Documentation

sfi.director.util.XmlCreator.XmlCreator  )  throws DirectorException
 


Member Function Documentation

void sfi.director.util.XmlCreator.addEncode String  st  ) 
 

add text.

void sfi.director.util.XmlCreator.addEncode char[]  ch  ) 
 

add text.

void sfi.director.util.XmlCreator.addEncode char[]  ch,
int  start,
int  length
 

add text.

The text is minimally encoded, thus <, > and " characters are translated.

void sfi.director.util.XmlCreator.addRaw String  st  ) 
 

add raw text.

The text is appended as is, thus may contain XML tags. The caller is responsible for ensuring correct encoding of special characters.

void sfi.director.util.XmlCreator.characters char[]  ch,
int  start,
int  length
 

add element contents.

static String sfi.director.util.XmlCreator.encode String  text  )  [static]
 

static String sfi.director.util.XmlCreator.encode char[]  ch,
int  start,
int  length
[static]
 

void sfi.director.util.XmlCreator.endElement String  localName  ) 
 

end an element.

This is SAX-alike.

void sfi.director.util.XmlCreator.setRaw String  newText  ) 
 

void sfi.director.util.XmlCreator.startElement String  localName,
Attributes  atts
 

start an element.

This is SAX-alike, though only the localName and attributes are currently used.

String sfi.director.util.XmlCreator.text  ) 
 

get the text representation of the current document.

The text contains exactly the elements and text that was added. No automatic addition of XML headers and such are made.


Member Data Documentation

StringBuffer sfi.director.util.XmlCreator.text = new StringBuffer() [package]
 


The documentation for this class was generated from the following file:
Generated on Sat May 19 01:20:00 2012 for Node Director by  doxygen 1.4.5