|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--com.objectwave.templateMerge.JspStyleRead
Used to parse an XML file.
| Nested Class Summary | |
static class |
JspStyleRead.Test
Unit Test |
| Constructor Summary | |
JspStyleRead()
Constructor for the JspStyleRead object |
|
JspStyleRead(java.io.Reader input)
Constructor |
|
JspStyleRead(java.lang.String uri)
Constructor |
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
This method will read the characters in an XML document. |
void |
endElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw)
This method will parse the collection in an XML document. |
protected java.util.Vector |
getBody(java.lang.String body)
read a string line by line and write them into a vector |
KnownTemplates |
getTemplates()
Get the KnowTemplates which has all information in the XML file |
protected void |
initialize()
|
protected void |
parse(org.xml.sax.InputSource uri)
Parse the XML |
protected void |
parse(java.lang.String uri)
Parse the XML |
protected void |
setSubTemplate()
set the sub templates for the current template |
void |
startElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw,
org.xml.sax.Attributes attrs)
This method will parse a single element in an XML document. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JspStyleRead(java.lang.String uri)
throws ConfigurationException
uri - String the XML file name
ConfigurationException
public JspStyleRead(java.io.Reader input)
throws ConfigurationException
input - Reader
ConfigurationExceptionpublic JspStyleRead()
| Method Detail |
public KnownTemplates getTemplates()
public void startElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw,
org.xml.sax.Attributes attrs)
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandleruri - String The Namespace URIlocal - String The local name (without prefix)raw - String The raw XML 1.0 name (with prefix)attrs - Attributes The attributes attached to the element.
public void endElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw)
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandleruri - String The Namespace URIlocal - String The local name (without prefix)raw - String The raw XML 1.0 name (with prefix)
public void characters(char[] ch,
int start,
int length)
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerch - char array The characters from the XML document.start - integer The start position in the array.length - integer The number of characters to read from the arrayprotected void setSubTemplate()
protected java.util.Vector getBody(java.lang.String body)
throws java.io.IOException
body - String the string to be read
java.io.IOExceptionprotected void initialize()
protected void parse(java.lang.String uri)
throws ConfigurationException
uri - The XML file name
ConfigurationException - If any error happen in the XML file
processing
protected void parse(org.xml.sax.InputSource uri)
throws ConfigurationException
uri - The input source of the XML data.
ConfigurationException - If any error happen in the XML file
processing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||