| java.lang.Object org.xml.sax.helpers.DefaultHandler org.custommonkey.xmlunit.TolerantSaxDocumentBuilder
TolerantSaxDocumentBuilder | public class TolerantSaxDocumentBuilder extends DefaultHandler implements LexicalHandler(Code) | | Uses Sax events from the ContentHandler and
LexicalHandler interfaces to build a DOM document in a tolerant
fashion -- it can cope with start tags without end tags, and end tags without
start tags for example.
Although this subverts the idea of XML being well-formed, it is intended
for use with HTML pages so that they can be transformed into DOM
trees, without being XHTML to start with.
Note that this class currently does not handle entity, DTD or CDATA tags.
Examples and more at xmlunit.sourceforge.net
See Also: HTMLDocumentBuilder.parse |
Method Summary | |
public void | characters(char[] data, int start, int length) ContentHandler method. | public void | comment(char ch, int start, int length) | public void | endCDATA() | public void | endDTD() | public void | endDocument() | public void | endElement(String namespaceURI, String localName, String qName) | public void | endEntity(String name) | public void | endPrefixMapping(String prefix) | public Document | getDocument() | public String | getTrace() | public void | ignorableWhitespace(char ch, int start, int length) | public void | processingInstruction(String target, String data) | public void | setDocumentLocator(Locator locator) | public void | skippedEntity(String name) | public void | startCDATA() | public void | startDTD(String name, String publicId, String systemId) Unhandled LexicalHandler method. | public void | startDocument() | public void | startElement(String namespaceURI, String localName, String qName, Attributes atts) | public void | startEntity(String name) | public void | startPrefixMapping(String prefix, String uri) |
characters | public void characters(char[] data, int start, int length)(Code) | | ContentHandler method.
|
getDocument | public Document getDocument()(Code) | | the Document built up through the Sax calls |
getTrace | public String getTrace()(Code) | | the trace of Sax calls that were used to build up the Document |
ignorableWhitespace | public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code) | | Unhandled ContentHandler method
throws: SAXException - |
setDocumentLocator | public void setDocumentLocator(Locator locator)(Code) | | Unhandled ContentHandler method
|
Methods inherited from org.xml.sax.helpers.DefaultHandler | public void characters(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String localName, String qName) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public void error(SAXParseException e) throws SAXException(Code)(Java Doc) public void fatalError(SAXParseException e) throws SAXException(Code)(Java Doc) public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException(Code)(Java Doc) public void setDocumentLocator(Locator locator)(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startDocument() throws SAXException(Code)(Java Doc) public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc) public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)(Java Doc) public void warning(SAXParseException e) throws SAXException(Code)(Java Doc)
|
|
|