org.apache.cocoon.portal.util
Class HtmlSaxParser

java.lang.Object
  extended by org.apache.xerces.parsers.XMLParser
      extended by org.apache.xerces.parsers.AbstractXMLDocumentParser
          extended by org.apache.xerces.parsers.AbstractSAXParser
              extended by org.apache.cocoon.portal.util.HtmlSaxParser
All Implemented Interfaces:
org.apache.xerces.xni.XMLDocumentHandler, org.apache.xerces.xni.XMLDTDContentModelHandler, org.apache.xerces.xni.XMLDTDHandler, org.apache.xerces.xs.PSVIProvider, Parser, XMLReader

public class HtmlSaxParser
extends org.apache.xerces.parsers.AbstractSAXParser

This parser uses the nekohtml parser to parse html and generate sax streams.

Version:
$Id: HtmlSaxParser.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Nested Class Summary
protected static class HtmlSaxParser.ContentFilter
           
 
Nested classes/interfaces inherited from class org.apache.xerces.parsers.AbstractSAXParser
org.apache.xerces.parsers.AbstractSAXParser.AttributesProxy, org.apache.xerces.parsers.AbstractSAXParser.LocatorProxy
 
Field Summary
 
Fields inherited from class org.apache.xerces.parsers.AbstractSAXParser
ALLOW_UE_AND_NOTATION_EVENTS, DECLARATION_HANDLER, DOM_NODE, fContentHandler, fDeclaredAttrs, fDeclHandler, fDocumentHandler, fDTDHandler, fLexicalHandler, fLexicalHandlerParameterEntities, fNamespaceContext, fNamespacePrefixes, fNamespaces, fParseInProgress, fQName, fResolveDTDURIs, fStandalone, fUseEntityResolver2, fVersion, fXMLNSURIs, LEXICAL_HANDLER, NAMESPACES, STRING_INTERNING
 
Fields inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser
fDocumentSource, fDTDContentModelSource, fDTDSource, fInDTD
 
Fields inherited from class org.apache.xerces.parsers.XMLParser
ENTITY_RESOLVER, ERROR_HANDLER, fConfiguration
 
Fields inherited from interface org.apache.xerces.xni.XMLDTDHandler
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE
 
Fields inherited from interface org.apache.xerces.xni.XMLDTDContentModelHandler
OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCE
 
Constructor Summary
HtmlSaxParser(Properties properties)
           
 
Method Summary
protected static org.cyberneko.html.HTMLConfiguration getConfig(Properties properties)
           
static XMLConsumer getContentFilter(ContentHandler ch)
           
static void parseString(String content, ContentHandler ch)
          Parse html stored in the string.
 
Methods inherited from class org.apache.xerces.parsers.AbstractSAXParser
attributeDecl, characters, comment, doctypeDecl, elementDecl, endCDATA, endDocument, endDTD, endElement, endExternalSubset, endGeneralEntity, endNamespaceMapping, endParameterEntity, externalEntityDecl, getAttributePSVI, getAttributePSVIByName, getContentHandler, getDeclHandler, getDTDHandler, getElementPSVI, getEntityResolver, getErrorHandler, getFeature, getLexicalHandler, getProperty, ignorableWhitespace, internalEntityDecl, notationDecl, parse, parse, processingInstruction, reset, setContentHandler, setDeclHandler, setDocumentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setLexicalHandler, setLocale, setProperty, startCDATA, startDocument, startElement, startExternalSubset, startGeneralEntity, startNamespaceMapping, startParameterEntity, unparsedEntityDecl, xmlDecl
 
Methods inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser
any, element, empty, emptyElement, endAttlist, endConditional, endContentModel, endGroup, getDocumentSource, getDTDContentModelSource, getDTDSource, ignoredCharacters, occurrence, pcdata, separator, setDocumentSource, setDTDContentModelSource, setDTDSource, startAttlist, startConditional, startContentModel, startDTD, startGroup, textDecl
 
Methods inherited from class org.apache.xerces.parsers.XMLParser
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlSaxParser

public HtmlSaxParser(Properties properties)
Method Detail

getConfig

protected static org.cyberneko.html.HTMLConfiguration getConfig(Properties properties)

parseString

public static void parseString(String content,
                               ContentHandler ch)
                        throws SAXException
Parse html stored in the string.

Throws:
SAXException

getContentFilter

public static XMLConsumer getContentFilter(ContentHandler ch)


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.