org.enhydra.xml.xmlc.parsers.xerces
Class XercesHTMLDOMParser

java.lang.Object
  |
  +--org.enhydra.apache.xerces.parsers.XMLParser
        |
        +--org.enhydra.apache.xerces.parsers.AbstractXMLDocumentParser
              |
              +--org.enhydra.apache.xerces.parsers.AbstractDOMParser
                    |
                    +--org.enhydra.apache.xerces.parsers.DOMParser
                          |
                          +--org.enhydra.xml.xmlc.parsers.xerces.XercesDOMParser
                                |
                                +--org.enhydra.xml.xmlc.parsers.xerces.XercesHTMLDOMParser
All Implemented Interfaces:
XMLCParser, org.enhydra.apache.xerces.xni.XMLDocumentHandler, org.enhydra.apache.xerces.xni.XMLDTDContentModelHandler, org.enhydra.apache.xerces.xni.XMLDTDHandler, org.enhydra.apache.xerces.xni.parser.XMLEntityResolver

public class XercesHTMLDOMParser
extends XercesDOMParser


Fields inherited from class org.enhydra.apache.xerces.parsers.DOMParser
fUseEntityResolver2, SYMBOL_TABLE, USE_ENTITY_RESOLVER2, XMLGRAMMAR_POOL
 
Fields inherited from class org.enhydra.apache.xerces.parsers.AbstractDOMParser
abort, CORE_DOCUMENT_CLASS_NAME, CREATE_CDATA_NODES_FEATURE, CREATE_ENTITY_REF_NODES, CURRENT_ELEMENT_NODE, DEFAULT_DOCUMENT_CLASS_NAME, DEFER_NODE_EXPANSION, DOCUMENT_CLASS_NAME, fBaseURIStack, fCreateCDATANodes, fCreateEntityRefNodes, fCurrentCDATASection, fCurrentCDATASectionIndex, fCurrentEntityDecl, fCurrentNode, fCurrentNodeIndex, fDeferNodeExpansion, fDeferredDocumentImpl, fDeferredEntityDecl, fDocument, fDocumentClassName, fDocumentImpl, fDocumentIndex, fDocumentType, fDocumentTypeIndex, fDOMFilter, fErrorHandler, fFilterReject, fFirstChunk, fInCDATASection, fIncludeComments, fIncludeIgnorableWhitespace, fInDTD, fInDTDExternalSubset, fInEntityRef, fInternalSubset, fNamespaceAware, fRejectedElement, fRoot, fSkippedElemStack, fStorePSVI, fStringBuffer, INCLUDE_COMMENTS_FEATURE, INCLUDE_IGNORABLE_WHITESPACE, NAMESPACES, PSVI_DOCUMENT_CLASS_NAME
 
Fields inherited from class org.enhydra.apache.xerces.parsers.AbstractXMLDocumentParser
fDocumentSource, fDTDContentModelSource, fDTDSource
 
Fields inherited from class org.enhydra.apache.xerces.parsers.XMLParser
ENTITY_RESOLVER, ERROR_HANDLER, fConfiguration
 
Fields inherited from interface org.enhydra.apache.xerces.xni.XMLDTDHandler
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE
 
Fields inherited from interface org.enhydra.apache.xerces.xni.XMLDTDContentModelHandler
OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCE
 
Constructor Summary
XercesHTMLDOMParser()
           
 
Method Summary
 void characters(org.enhydra.apache.xerces.xni.XMLString text, org.enhydra.apache.xerces.xni.Augmentations augs)
          Execution is passed to the superclass if it's not just whitespace.
protected  void features(MetaData metaData)
          Called by parse() to allow DOMParser features to be set.
 XMLCDocument parse(InputSource input, LineNumberMap lineNumberMap, XMLCDomFactory domFactory, MetaData metaData, ErrorReporter errorReporter, ParseTracer tracer)
          Parses using the Xerces DOMParser and the XMLC XMLEntityResolver.
 void startElement(org.enhydra.apache.xerces.xni.QName element, org.enhydra.apache.xerces.xni.XMLAttributes attributes, org.enhydra.apache.xerces.xni.Augmentations augs)
          Capture the current element for comparison in characters() with the pre-defined array of PCDATA HTML elements.
 
Methods inherited from class org.enhydra.xml.xmlc.parsers.xerces.XercesDOMParser
attributeDecl, elementDecl, pcdata, resolveEntity, xmlDecl
 
Methods inherited from class org.enhydra.apache.xerces.parsers.DOMParser
, getEntityResolver, getErrorHandler, getFeature, getProperty, getXMLParserConfiguration, parse, parse, setEntityResolver, setErrorHandler, setFeature, setProperty
 
Methods inherited from class org.enhydra.apache.xerces.parsers.AbstractDOMParser
abort, comment, createAttrNode, createElementNode, doctypeDecl, dropDocumentReferences, emptyElement, endAttlist, endCDATA, endConditional, endDocument, endDTD, endElement, endExternalSubset, endGeneralEntity, endParameterEntity, externalEntityDecl, getDocument, getDocumentClassName, handleBaseURI, handleBaseURI, ignorableWhitespace, ignoredCharacters, internalEntityDecl, notationDecl, processingInstruction, reset, setCharacterData, setDocumentClassName, setLocale, startAttlist, startCDATA, startConditional, startDocument, startDTD, startExternalSubset, startGeneralEntity, startParameterEntity, textDecl, unparsedEntityDecl
 
Methods inherited from class org.enhydra.apache.xerces.parsers.AbstractXMLDocumentParser
any, element, empty, endContentModel, endGroup, getDocumentSource, getDTDContentModelSource, getDTDSource, occurrence, separator, setDocumentSource, setDTDContentModelSource, setDTDSource, startContentModel, startGroup
 
Methods inherited from class org.enhydra.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

XercesHTMLDOMParser

public XercesHTMLDOMParser()
Method Detail

parse

public XMLCDocument parse(InputSource input,
                          LineNumberMap lineNumberMap,
                          XMLCDomFactory domFactory,
                          MetaData metaData,
                          ErrorReporter errorReporter,
                          ParseTracer tracer)
                   throws IOException,
                          XMLCException,
                          SAXException
Description copied from class: XercesDOMParser
Parses using the Xerces DOMParser and the XMLC XMLEntityResolver. The resulting DOM document is set on the XMLCDocument after a successful parse. The type of DOM bound to by the DOM parser is defined by setting the Xerces property "http://apache.org/xml/properties/dom/document-class-name" to the fully qualified DOM Document name returned by the getDocumentClassName() method of the current XMLCDomFactory.
Overrides:
parse in class XercesDOMParser
Following copied from class: org.enhydra.xml.xmlc.parsers.xerces.XercesDOMParser
Returns:
a populated XMLCDocument
See Also:
XMLCParser.parse(org.xml.sax.InputSource, org.enhydra.xml.xmlc.misc.LineNumberMap, org.enhydra.xml.xmlc.dom.XMLCDomFactory, org.enhydra.xml.xmlc.metadata.MetaData, org.enhydra.xml.io.ErrorReporter, org.enhydra.xml.xmlc.parsers.ParseTracer)

features

protected void features(MetaData metaData)
                 throws XMLCException
Description copied from class: XercesDOMParser
Called by parse() to allow DOMParser features to be set. Also provides an opportunity to validate metadata, if need be.
Overrides:
features in class XercesDOMParser
Following copied from class: org.enhydra.xml.xmlc.parsers.xerces.XercesDOMParser
Parameters:
metaData - the XMLC metadata for the markup to be parsed
Throws:
XMLCException - if metadata is found to be invalid for the current parser

characters

public void characters(org.enhydra.apache.xerces.xni.XMLString text,
                       org.enhydra.apache.xerces.xni.Augmentations augs)
                throws org.enhydra.apache.xerces.xni.XNIException
Execution is passed to the superclass if it's not just whitespace. See: http://www.cafeconleche.org/books/xmljava/chapters/ch06s10.html
Overrides:
characters in class org.enhydra.apache.xerces.parsers.AbstractDOMParser
See Also:
XMLDocumentHandler.characters(org.enhydra.apache.xerces.xni.XMLString, org.enhydra.apache.xerces.xni.Augmentations)

startElement

public void startElement(org.enhydra.apache.xerces.xni.QName element,
                         org.enhydra.apache.xerces.xni.XMLAttributes attributes,
                         org.enhydra.apache.xerces.xni.Augmentations augs)
Capture the current element for comparison in characters() with the pre-defined array of PCDATA HTML elements.
Overrides:
startElement in class org.enhydra.apache.xerces.parsers.AbstractDOMParser
See Also:
XMLDocumentHandler.startElement(org.enhydra.apache.xerces.xni.QName, org.enhydra.apache.xerces.xni.XMLAttributes, org.enhydra.apache.xerces.xni.Augmentations)


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.