Package org.web3d.vrml.export
Class SAXPrinter
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.web3d.vrml.export.SAXPrinter
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Converts a SAX stream of events to an X3D textual representation.
- Version:
- $Revision: 1.4 $
- Author:
- Alan Hudson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe major version of the spec this file belongs to.protected intThe minor version of the spec this file belongs to.protected booleanShould we print the XML Element -
Constructor Summary
ConstructorsConstructorDescriptionSAXPrinter(Writer out, int majorVersion, int minorVersion, boolean printDocType) SAXPrinter(Writer out, int majorVersion, int minorVersion, boolean printDocType, boolean printXML) -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidvoidendElement(String namespaceURI, String localName, String qName) protected StringgetPublicId(int major, int minor) Get the publicId for this spec versionprotected StringgetSystemId(int major, int minor) Get the https publicId for this spec versionvoidvoidstartElement(String namespaceURI, String localName, String qName, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warningMethods 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
-
majorVersion
protected int majorVersionThe major version of the spec this file belongs to. -
minorVersion
protected int minorVersionThe minor version of the spec this file belongs to. -
printXML
protected boolean printXMLShould we print the XML Element
-
-
Constructor Details
-
SAXPrinter
-
SAXPrinter
public SAXPrinter(Writer out, int majorVersion, int minorVersion, boolean printDocType, boolean printXML)
-
-
Method Details
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
getPublicId
Get the publicId for this spec version- Parameters:
major- The major versionminor- The minor version- Returns:
- The speced public id
-
getSystemId
Get the https publicId for this spec version- Parameters:
major- The major versionminor- The minor version- Returns:
- The speced public id
-