Package eu.bandm.tools.util.xml
Class SAXSyntaxChecker
java.lang.Object
eu.bandm.tools.util.xml.SAXSyntaxChecker
- All Implemented Interfaces:
ContentHandler
,LexicalHandler
Applies additional syntax checks before passing on the SAX messages.
Since these can be expensive, they are not part of the
functinal classes but separate. So they can be left out
use cases where arguments are known to be save.
-
Constructor Summary
ConstructorDescriptionSAXSyntaxChecker
(ContentHandler contentHandler, LexicalHandler lexicalHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
comment
(char[] ch, int start, int length) Checks for appearance of "--", which is not allowed.void
endCDATA()
void
void
endDTD()
void
endElement
(String namespaceURI, String localName, String qName) void
void
endPrefixMapping
(String prefix) void
ignorableWhitespace
(char[] ch, int start, int length) void
processingInstruction
(String target, String data) void
setDocumentLocator
(Locator locator) void
skippedEntity
(String name) void
void
void
void
startElement
(String namespaceURI, String localName, String qName, Attributes atts) void
void
startPrefixMapping
(String prefix, String uri) 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
-
Constructor Details
-
SAXSyntaxChecker
-
-
Method Details
-
comment
Checks for appearance of "--", which is not allowed.- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-
endCDATA
public void endCDATA()- Specified by:
endCDATA
in interfaceLexicalHandler
-
startCDATA
public void startCDATA()- Specified by:
startCDATA
in interfaceLexicalHandler
-
endEntity
- Specified by:
endEntity
in interfaceLexicalHandler
-
startEntity
- Specified by:
startEntity
in interfaceLexicalHandler
-
endDTD
public void endDTD()- Specified by:
endDTD
in interfaceLexicalHandler
-
startDTD
- Specified by:
startDTD
in interfaceLexicalHandler
-
characters
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-