Class XhtmlHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.xwiki.rendering.wikimodel.xhtml.impl.XhtmlHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
public class XhtmlHandler extends DefaultHandler implements LexicalHandler
SAX2 event and extension handler to parse XHTML into wikimodel events- Since:
- 4.0M1
- Version:
- $Id: c3a8d392356bc62d8ddc01e0aa835ee4ca9a4575 $
-
-
Constructor Summary
Constructors Constructor Description XhtmlHandler(WikiScannerContext context, Map<String,TagHandler> extraHandlers)
XhtmlHandler(WikiScannerContext context, Map<String,TagHandler> extraHandlers, CommentHandler commentHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] array, int start, int length)
void
comment(char[] array, int start, int length)
void
endCDATA()
void
endDocument()
void
endDTD()
void
endElement(String uri, String localName, String qName)
void
endEntity(String arg0)
void
startCDATA()
void
startDocument()
void
startDTD(String arg0, String arg1, String arg2)
void
startElement(String uri, String localName, String qName, Attributes attributes)
void
startEntity(String arg0)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
XhtmlHandler
public XhtmlHandler(WikiScannerContext context, Map<String,TagHandler> extraHandlers)
-
XhtmlHandler
public XhtmlHandler(WikiScannerContext context, Map<String,TagHandler> extraHandlers, CommentHandler commentHandler)
- Parameters:
context
-
-
-
Method Detail
-
characters
public void characters(char[] array, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
- See Also:
DefaultHandler.characters(char[], int, int)
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
- See Also:
DefaultHandler.endDocument()
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
- See Also:
DefaultHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
- See Also:
DefaultHandler.startDocument()
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
- See Also:
DefaultHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
-
comment
public void comment(char[] array, int start, int length) throws SAXException
- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-
endCDATA
public void endCDATA() throws SAXException
- Specified by:
endCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
endDTD
public void endDTD() throws SAXException
- Specified by:
endDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
endEntity
public void endEntity(String arg0) throws SAXException
- Specified by:
endEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
startCDATA
public void startCDATA() throws SAXException
- Specified by:
startCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
startDTD
public void startDTD(String arg0, String arg1, String arg2) throws SAXException
- Specified by:
startDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
startEntity
public void startEntity(String arg0) throws SAXException
- Specified by:
startEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
-