com.caucho.xml2
Class SAXBuilder

java.lang.Object
  extended by com.caucho.xml2.SAXBuilder
All Implemented Interfaces:
XMLWriter, org.xml.sax.Locator

public class SAXBuilder
extends java.lang.Object
implements XMLWriter, org.xml.sax.Locator

XMLWriter to create a SAX events.


Constructor Summary
SAXBuilder()
           
SAXBuilder(org.xml.sax.XMLReader saxReader)
           
 
Method Summary
 void attribute(java.lang.String uri, java.lang.String localName, java.lang.String qName, java.lang.String value)
           
 void cdata(char[] buffer, int offset, int length)
           
 void cdata(java.lang.String text)
           
 void comment(java.lang.String data)
           
 void endDocument()
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 void endPrefixMapping(java.lang.String prefix)
           
 int getColumnNumber()
          The column number is always 0.
 boolean getEscapeText()
           
 int getLineNumber()
          Returns the current line.
 java.lang.String getPublicId()
          Don't really have a public id (?).
 java.lang.String getSystemId()
          Returns the current filename.
 void init()
           
 void init(org.xml.sax.XMLReader saxReader)
           
 void processingInstruction(java.lang.String name, java.lang.String data)
           
 void setContentHandler(org.xml.sax.ContentHandler handler)
          Sets the SAX content handler.
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void setEscapeText(boolean isEscaped)
           
 void setLocation(java.lang.String filename, int line, int column)
           
 void startDocument()
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
          Starts the building of an element.
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
           
 void text(char[] buffer, int offset, int length)
           
 void text(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXBuilder

public SAXBuilder()

SAXBuilder

public SAXBuilder(org.xml.sax.XMLReader saxReader)
Method Detail

init

public void init(org.xml.sax.XMLReader saxReader)

init

public void init()

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
Sets the SAX content handler.


setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface XMLWriter

startDocument

public void startDocument()
                   throws java.io.IOException,
                          org.xml.sax.SAXException
Specified by:
startDocument in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws java.io.IOException,
                        org.xml.sax.SAXException
Specified by:
endDocument in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

setLocation

public void setLocation(java.lang.String filename,
                        int line,
                        int column)

getSystemId

public java.lang.String getSystemId()
Returns the current filename.

Specified by:
getSystemId in interface org.xml.sax.Locator

getPublicId

public java.lang.String getPublicId()
Don't really have a public id (?).

Specified by:
getPublicId in interface org.xml.sax.Locator

getLineNumber

public int getLineNumber()
Returns the current line.

Specified by:
getLineNumber in interface org.xml.sax.Locator

getColumnNumber

public int getColumnNumber()
The column number is always 0.

Specified by:
getColumnNumber in interface org.xml.sax.Locator

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName)
                  throws java.io.IOException,
                         org.xml.sax.SAXException
Starts the building of an element.

Specified by:
startElement in interface XMLWriter
Parameters:
uri - the element's namespace URI
localName - the element's local name
qName - the element's fully qualified name
Throws:
java.io.IOException
org.xml.sax.SAXException

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws java.io.IOException,
                               org.xml.sax.SAXException
Specified by:
startPrefixMapping in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws java.io.IOException,
                             org.xml.sax.SAXException
Specified by:
endPrefixMapping in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

attribute

public void attribute(java.lang.String uri,
                      java.lang.String localName,
                      java.lang.String qName,
                      java.lang.String value)
               throws java.io.IOException,
                      org.xml.sax.SAXException
Specified by:
attribute in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws java.io.IOException,
                       org.xml.sax.SAXException
Specified by:
endElement in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

processingInstruction

public void processingInstruction(java.lang.String name,
                                  java.lang.String data)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException
Specified by:
processingInstruction in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

comment

public void comment(java.lang.String data)
             throws java.io.IOException,
                    org.xml.sax.SAXException
Specified by:
comment in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

getEscapeText

public boolean getEscapeText()
Specified by:
getEscapeText in interface XMLWriter

setEscapeText

public void setEscapeText(boolean isEscaped)
Specified by:
setEscapeText in interface XMLWriter

text

public void text(java.lang.String text)
          throws java.io.IOException,
                 org.xml.sax.SAXException
Specified by:
text in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

text

public void text(char[] buffer,
                 int offset,
                 int length)
          throws java.io.IOException,
                 org.xml.sax.SAXException
Specified by:
text in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

cdata

public void cdata(java.lang.String text)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Specified by:
cdata in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException

cdata

public void cdata(char[] buffer,
                  int offset,
                  int length)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Specified by:
cdata in interface XMLWriter
Throws:
java.io.IOException
org.xml.sax.SAXException