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 int
The major version of the spec this file belongs to.protected int
The minor version of the spec this file belongs to.protected boolean
Should 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 TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
void
endElement
(String namespaceURI, String localName, String qName) protected String
getPublicId
(int major, int minor) Get the publicId for this spec versionprotected String
getSystemId
(int major, int minor) Get the https publicId for this spec versionvoid
void
startElement
(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, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in 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
-