Package net.ontopia.xml
Class ContentWriter
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- net.ontopia.xml.ContentWriter
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class ContentWriter extends DefaultHandler
-
-
Constructor Summary
Constructors Constructor Description ContentWriter(String file)
ContentWriter(String file, String encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] buf, int start, int len)
void
endDocument()
void
endElement(String namespaceURI, String localName, String qName)
protected String
escape(String attrval)
void
startElement(String namespaceURI, String localName, String qName, Attributes atts)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
ContentWriter
public ContentWriter(String file) throws IOException
- Throws:
IOException
-
ContentWriter
public ContentWriter(String file, String encoding) throws IOException
- Throws:
IOException
-
-
Method Detail
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
characters
public void characters(char[] buf, int start, int len) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
endElement
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
-
-