Package net.ontopia.xml
Class CanonicalPrinter
java.lang.Object
net.ontopia.xml.CanonicalPrinter
- All Implemented Interfaces:
ContentHandler
- Direct Known Subclasses:
CanonicalTopicMapWriter.CanonicalXTMPrinter
INTERNAL: SAX document handler that prints canonical XML. Note that
this does not support all of http://www.w3.org/TR/xml-c14n, only
what is needed for Canonical XTM.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCanonicalPrinter(OutputStream stream, boolean closeWRiter) Creates a CanonicalPrinter that writes to the given OutputStream.CanonicalPrinter(Writer writer, boolean closeWRiter) Creates a CanonicalPrinter that writes to the given Writer. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidvoidendElement(String uri, String localName, String name) voidendPrefixMapping(String prefix) voidignorableWhitespace(char[] ch, int start, int length) voidprocessingInstruction(String target, String data) voidsetDocumentLocator(Locator locator) voidskippedEntity(String name) voidvoidstartElement(String uri, String localName, String name, Attributes atts) voidstartPrefixMapping(String prefix, String uri) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
writer
-
-
Constructor Details
-
CanonicalPrinter
Creates a CanonicalPrinter that writes to the given OutputStream. The encoding used is always utf-8. -
CanonicalPrinter
Creates a CanonicalPrinter that writes to the given Writer.
-
-
Method Details
-
startDocument
public void startDocument()- Specified by:
startDocumentin interfaceContentHandler
-
startElement
- Specified by:
startElementin interfaceContentHandler
-
endElement
- Specified by:
endElementin interfaceContentHandler
-
characters
public void characters(char[] ch, int start, int length) - Specified by:
charactersin interfaceContentHandler
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) - Specified by:
ignorableWhitespacein interfaceContentHandler
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler
-
endDocument
public void endDocument()- Specified by:
endDocumentin interfaceContentHandler
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
escape
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-