[hide private]
[frames] | no frames]

[ Module Hierarchy | Class Hierarchy ]

# Class Hierarchy

- xml.sax.handler.ContentHandler: Interface for receiving logical document content events.
  - lxml.sax.ElementTreeContentHandler: Build an lxml ElementTree from SAX events.
- lxml.html.diff.DEL_END
- lxml.html.diff.DEL_START
- UserDict.DictMixin
  - lxml.html.FieldsDict
- lxml.etree.ErrorDomains: Libxml2 error domains
- lxml.etree.ErrorLevels: Libxml2 error levels
- lxml.etree.ErrorTypes: Libxml2 error types
- lxml.tests.common_imports.LargeFileLike
  - lxml.tests.common_imports.LargeFileLikeUnicode
- doctest.OutputChecker: A class used to check the whether the actual output from a doctest example matches the expected output.
  - lxml.doctestcompare.LXMLOutputChecker
    - lxml.doctestcompare.LHTMLOutputChecker
- lxml.etree.RelaxNGErrorTypes: Libxml2 RelaxNG error types
- difflib.SequenceMatcher: SequenceMatcher is a flexible class for comparing pairs of sequences of any type, so long as the sequence elements are hashable.
  - lxml.html.diff.InsensitiveSequenceMatcher: Acts like SequenceMatcher, but tries not to find very small equal blocks amidst large spans of changes
- lxml.tests.common_imports.SillyFileLike
- object: The most base type
  - lxml.cssselect.Attrib: Represents selector[namespace|attrib operator value]
  - exceptions.BaseException: Common base class for all exceptions
    - exceptions.Exception: Common base class for all non-exit exceptions.
      - lxml.etree.Error
        - lxml.etree.LxmlError: Main exception base class for lxml.
          - lxml.etree.C14NError: Error during C14N serialisation.
          - lxml.etree.DTDError: Base class for DTD errors.
            - lxml.etree.DTDParseError: Error while parsing a DTD.
            - lxml.etree.DTDValidateError: Error while validating an XML document with a DTD.
          - lxml.etree.DocumentInvalid: Validation error.
          - lxml.etree.LxmlRegistryError: Base class of lxml registry errors.
            - lxml.etree.NamespaceRegistryError: Error registering a namespace extension.
          - lxml.etree.LxmlSyntaxError: Base class for all syntax errors.
            - lxml.ElementInclude.FatalIncludeError
            - lxml.etree.ParseError: Syntax error while parsing an XML document.
              - lxml.etree.XMLSyntaxError: Syntax error while parsing an XML document.
            - lxml.etree.XPathSyntaxError
          - lxml.etree.ParserError: Internal lxml parser error.
          - lxml.etree.RelaxNGError: Base class for RelaxNG errors.
            - lxml.etree.RelaxNGParseError: Error while parsing an XML document as RelaxNG.
            - lxml.etree.RelaxNGValidateError: Error while validating an XML document with a RelaxNG schema.
          - lxml.sax.SaxError: General SAX error.
          - lxml.etree.SchematronError: Base class of all Schematron errors.
            - lxml.etree.SchematronParseError: Error while parsing an XML document as Schematron schema.
            - lxml.etree.SchematronValidateError: Error while validating an XML document with a Schematron schema.
          - lxml.etree.XIncludeError: Error during XInclude processing.
          - lxml.etree.XMLSchemaError: Base class of all XML Schema errors
            - lxml.etree.XMLSchemaParseError: Error while parsing an XML document as XML Schema.
            - lxml.etree.XMLSchemaValidateError: Error while validating an XML document with an XML Schema.
          - lxml.etree.XPathError: Base class of all XPath errors.
            - lxml.etree.XPathEvalError: Error during XPath evaluation.
              - lxml.etree.XPathFunctionError: Internal error looking up an XPath extension function.
              - lxml.etree.XPathResultError: Error handling an XPath result.
            - lxml.etree.XPathSyntaxError
          - lxml.etree.XSLTError: Base class of all XSLT errors.
            - lxml.etree.XSLTApplyError: Error running an XSL transformation.
            - lxml.etree.XSLTExtensionError: Error registering an XSLT extension.
            - lxml.etree.XSLTParseError: Error parsing a stylesheet document.
            - lxml.etree.XSLTSaveError: Error serialising an XSLT result.
      - lxml.html.diff.NoDeletes: Raised when the document no longer contains any pending deletes (DEL_START/DEL_END)
      - exceptions.StandardError: Base class for all standard Python exceptions that do not represent interpreter exiting.
        - exceptions.AssertionError: Assertion failed.
        - exceptions.LookupError: Base class for lookup errors.
          - lxml.html.formfill.FormNotFound: Raised when no form can be found
        - exceptions.RuntimeError: Unspecified run-time error.
          - lxml.cssselect.ExpressionError
        - exceptions.SyntaxError: Invalid syntax.
          - lxml.etree.LxmlSyntaxError: Base class for all syntax errors.
            - lxml.ElementInclude.FatalIncludeError
            - lxml.etree.ParseError: Syntax error while parsing an XML document.
              - lxml.etree.XMLSyntaxError: Syntax error while parsing an XML document.
            - lxml.etree.XPathSyntaxError
          - elementtree.ElementTree.ParseError
          - lxml.cssselect.SelectorSyntaxError
      - lxml.etree._TargetParserResult
  - lxml.etree.CDATA: CDATA(data)
  - lxml.cssselect.Class: Represents selector.class_name
  - lxml.html.clean.Cleaner: Instances cleans the document of each of the possible offending elements.
  - lxml.cssselect.CombinedSelector
  - lxml.html.formfill.DefaultErrorCreator
  - lxml.etree.DocInfo: Document information provided by parser and DTD.
  - lxml.cssselect.Element: Represents namespace|element
  - elementtree.ElementTree.Element
  - lxml.etree.ElementClassLookup: ElementClassLookup(self) Superclass of Element class lookups.
    - lxml.etree.ElementDefaultClassLookup: ElementDefaultClassLookup(self, element=None, comment=None, pi=None, entity=None) Element class lookup scheme that always returns the default Element class.
    - lxml.etree.FallbackElementClassLookup: FallbackElementClassLookup(self, fallback=None)
      - lxml.etree.AttributeBasedElementClassLookup: AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None) Checks an attribute of an Element and looks up the value in a class dictionary.
      - lxml.etree.CustomElementClassLookup: CustomElementClassLookup(self, fallback=None) Element class lookup based on a subclass method.
        - lxml.html.HtmlElementClassLookup: A lookup scheme for HTML Element classes.
      - lxml.etree.ElementNamespaceClassLookup: ElementNamespaceClassLookup(self, fallback=None)
      - lxml.etree.ParserBasedElementClassLookup: ParserBasedElementClassLookup(self, fallback=None) Element class lookup based on the XML parser.
      - lxml.pyclasslookup.PythonElementClassLookup: PythonElementClassLookup(self, fallback=None) Element class lookup based on a subclass method.
      - lxml.etree.PythonElementClassLookup: PythonElementClassLookup(self, fallback=None) Element class lookup based on a subclass method.
    - lxml.objectify.ObjectifyElementClassLookup: ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None) Element class lookup method that uses the objectify classes.
  - lxml.builder.ElementMaker: Element generator factory.
  - lxml.objectify.ElementMaker: ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)
  - lxml.etree.ElementTextIterator: ElementTextIterator(self, element, tag=None, with_tail=True) Iterates over the text content of a subtree.
  - elementtree.ElementTree.ElementTree
  - lxml.sax.ElementTreeProducer: Produces SAX events for an element and children.
  - lxml.cssselect.Function: Represents selector:name(expr)
  - lxml.cssselect.Hash: Represents selector#id
  - lxml.html.HtmlMixin
    - lxml.html.HtmlComment
    - lxml.html.HtmlElement
      - lxml.html.FormElement: Represents a <form> element.
      - lxml.html.InputElement: Represents an `<input>` element.
      - lxml.html.LabelElement: Represents a `<label>` element.
      - lxml.html.SelectElement: `<select>` element.
      - lxml.html.TextareaElement: `<textarea>` element.
    - lxml.html.HtmlEntity
    - lxml.html.HtmlProcessingInstruction
  - lxml.html.InputGetter: An accessor that represents all the input fields in a form.
  - lxml.html.InputMixin: Mix-in for all input elements (input, select, and textarea)
    - lxml.html.InputElement: Represents an `<input>` element.
    - lxml.html.SelectElement: `<select>` element.
    - lxml.html.TextareaElement: `<textarea>` element.
  - lxml.objectify.ObjectPath: ObjectPath(path) Immutable object that represents a compiled object path.
  - lxml.cssselect.Or
  - lxml.cssselect.Pseudo: Represents selector:ident
  - lxml.objectify.PyType: PyType(self, name, type_check, type_class, stringify=None) User defined type.
  - lxml.etree.QName: QName(text_or_uri, tag=None)
  - elementtree.ElementTree.QName
  - lxml.etree.Resolver: This is the base class of all resolvers.
    - lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.simple_resolver
  - lxml.html._setmixin.SetMixin: Mix-in for sets.
    - lxml.html.CheckboxValues: Represents the values of the checked checkboxes in a group of checkboxes with the same name.
    - lxml.html.MultipleSelectOptions: Represents all the selected options in a `<select multiple>` element.
  - unittest.TestCase: A class whose instances are single test cases.
    - lxml.tests.common_imports.HelperTestCase
      - lxml.tests.test_css.CSSTestCase
      - lxml.tests.test_classlookup.ClassLookupTestCase: Test cases for different Element class lookup mechanisms.
      - lxml.tests.test_etree.ETreeC14NTestCase
      - lxml.tests.test_dtd.ETreeDtdTestCase
      - lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase: Tests for the ETXPath class
      - lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase
      - lxml.tests.test_etree.ETreeOnlyTestCase: Tests only for etree, not ElementTree
      - lxml.tests.test_relaxng.ETreeRelaxNGTestCase
      - lxml.tests.test_sax.ETreeSaxTestCase
      - lxml.tests.test_schematron.ETreeSchematronTestCase
      - lxml.tests.test_elementtree.ETreeTestCaseBase
        - lxml.tests.test_elementtree.ETreeTestCase
        - lxml.tests.test_elementtree.ElementTreeTestCase
      - lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase
      - lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase: Tests for the XPath class
      - lxml.tests.test_xpathevaluator.ETreeXPathTestCase: XPath tests etree
      - lxml.tests.test_xslt.ETreeXSLTTestCase: XSLT tests etree
      - lxml.tests.test_errors.ErrorTestCase
      - lxml.tests.test_htmlparser.HtmlParserTestCase: HTML parser test cases
      - lxml.tests.test_io.IOTestCaseBase: (c)ElementTree compatibility for IO functions/methods
        - lxml.tests.test_io.ETreeIOTestCase
        - lxml.tests.test_io.ElementTreeIOTestCase
      - lxml.tests.test_objectify.ObjectifyTestCase: Test cases for lxml.objectify
      - lxml.tests.test_xslt.Py3XSLTTestCase: XSLT tests for etree under Python 3
      - lxml.tests.test_pyclasslookup.PyClassLookupTestCase: Test cases for the lxml.pyclasslookup class lookup mechanism.
      - lxml.tests.test_threading.ThreadingTestCase: Threading tests
      - lxml.tests.test_unicode.UnicodeTestCase
      - lxml.tests.test_etree.XIncludeTestCase
        - lxml.tests.test_etree.ETreeXIncludeTestCase
        - lxml.tests.test_etree.ElementIncludeTestCase
  - lxml.cssselect.TokenStream
  - elementtree.ElementTree.TreeBuilder
  - lxml.etree.XInclude: XInclude(self) XInclude processor.
  - elementtree.ElementTree.XMLParser
  - lxml.cssselect.XPathExpr
    - lxml.cssselect.XPathExprOr: Represents |'d expressions.
  - lxml.etree.XSLT: XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None)
  - lxml.etree.XSLTAccessControl: XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True)
  - lxml.etree.XSLTExtension: Base class of an XSLT extension element.
  - lxml.etree._Attrib: A dict-like proxy for the `Element.attrib` property.
  - lxml.etree._AttribIterator: Attribute iterator - for internal use only!
  - lxml.etree._BaseContext
    - lxml.etree._XPathContext
    - lxml.etree._XSLTContext
  - lxml.etree._BaseErrorLog
    - lxml.etree.PyErrorLog: PyErrorLog(self, logger_name=None) A global error log that connects to the Python stdlib logging package.
    - lxml.etree._ListErrorLog: Immutable base version of a list based error log.
      - lxml.etree._ErrorLog
        - lxml.etree._DomainErrorLog
        - lxml.etree._RotatingErrorLog
  - lxml.etree._BaseParser
    - lxml.etree._FeedParser
      - lxml.etree.HTMLParser: HTMLParser(self, recover=True, no_network=True, remove_blank_text=False, compact=True, remove_comments=False, remove_pis=False, target=None, encoding=None, schema=None) The HTML parser.
        - lxml.html.HTMLParser
      - lxml.etree.XMLParser: XMLParser(self, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, remove_blank_text=False, compact=True, resolve_entities=True, remove_comments=False, remove_pis=False, target=None, encoding=None, schema=None) The XML parser.
        - lxml.etree.ETCompatXMLParser: ETCompatXMLParser(self, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, remove_blank_text=False, compact=True, resolve_entities=True, remove_comments=True, remove_pis=True, target=None, encoding=None, schema=None) An XML parser with an ElementTree compatible default setup.
        - lxml.html.XHTMLParser
    - lxml.etree.iterparse: iterparse(self, source, events=("end",), tag=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, remove_blank_text=False, remove_comments=False, remove_pis=False, encoding=None, html=False, schema=None)
  - lxml.etree._Document: Internal base class to reference a libxml document.
  - lxml.etree._Element: Element class.
    - lxml.etree.ElementBase: All custom Element classes must inherit from this one.
      - lxml.html.HtmlElement
        - lxml.html.FormElement: Represents a <form> element.
        - lxml.html.InputElement: Represents an `<input>` element.
        - lxml.html.LabelElement: Represents a `<label>` element.
        - lxml.html.SelectElement: `<select>` element.
        - lxml.html.TextareaElement: `<textarea>` element.
      - lxml.objectify.ObjectifiedElement: Main XML Element class.
        - lxml.objectify.ObjectifiedDataElement: This is the base class for all data type Elements.
          - lxml.objectify.NoneElement
          - lxml.objectify.NumberElement
            - lxml.objectify.FloatElement
            - lxml.objectify.IntElement
              - lxml.objectify.BoolElement: Boolean type base on string values: 'true' or 'false'.
            - lxml.objectify.LongElement
          - lxml.objectify.StringElement: String data class.
      - lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class
      - lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class
      - lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class
    - lxml.etree.__ContentOnlyElement
      - lxml.etree._Comment
        - lxml.etree.CommentBase: All custom Comment classes must inherit from this one.
          - lxml.html.HtmlComment
      - lxml.etree._Entity
        - lxml.etree.EntityBase: All custom Entity classes must inherit from this one.
          - lxml.html.HtmlEntity
      - lxml.etree._ProcessingInstruction
        - lxml.etree.PIBase: All custom Processing Instruction classes must inherit from this one.
          - lxml.html.HtmlProcessingInstruction
          - lxml.etree._XSLTProcessingInstruction
  - lxml.pyclasslookup._ElementProxy
  - lxml.etree._ElementTagMatcher
    - lxml.etree.ElementDepthFirstIterator: ElementDepthFirstIterator(self, node, tag=None, inclusive=True) Iterates over an element and its sub-elements in document order (depth first pre-order).
    - lxml.etree._ElementIterator
      - lxml.etree.AncestorsIterator: AncestorsIterator(self, node, tag=None) Iterates over the ancestors of an element (from parent to parent).
      - lxml.etree.ElementChildIterator: ElementChildIterator(self, node, tag=None, reversed=False) Iterates over the children of an element.
      - lxml.etree.SiblingsIterator: SiblingsIterator(self, node, tag=None, preceding=False) Iterates over the siblings of an element.
  - lxml.etree._ElementTree
    - lxml.etree._XSLTResultTree
  - lxml.etree._ExceptionContext
    - lxml.etree._ResolverContext
      - lxml.etree._ParserContext
        - lxml.etree._IterparseContext
        - lxml.etree._SaxParserContext: This class maps SAX2 events to method calls.
          - lxml.etree._TargetParserContext: This class maps SAX2 events to the ET parser target interface.
      - lxml.etree._XSLTResolverContext
  - lxml.etree._ExsltRegExp
  - lxml.etree._FileReaderContext
  - lxml.etree._FilelikeWriter
  - lxml.etree._IDDict: IDDict(self, etree) A dictionary-like proxy class that mapps ID attributes to elements.
  - lxml.etree._InputDocument
  - elementtree.ElementTree._IterParseIterator
  - lxml.etree._LogEntry
  - lxml.html._MethodFunc: An object that represents a method on an element as a function; the function takes either an element or an HTML string.
  - lxml.etree._NamespaceRegistry: Dictionary-like namespace registry
    - lxml.etree._ClassNamespaceRegistry: Dictionary-like registry for namespace implementation classes
    - lxml.etree._FunctionNamespaceRegistry
      - lxml.etree._XPathFunctionNamespaceRegistry
  - lxml.objectify._ObjectifyElementMakerCaller
  - lxml.etree._ParserDictionaryContext
  - lxml.etree._ParserSchemaValidationContext
  - lxml.etree._ReadOnlyElementProxy: The main read-only Element proxy class (for internal use only!).
    - lxml.etree._AppendOnlyElementProxy: A read-only element that allows adding children and changing the text content (i.e.
  - lxml.etree._ResolverRegistry
  - lxml.doctestcompare._RestoreChecker
  - lxml.etree._SaxParserTarget
    - lxml.etree.TreeBuilder: TreeBuilder(self, element_factory=None, parser=None) Parser target that builds a tree.
    - lxml.etree._PythonSaxParserTarget
  - elementtree.ElementTree._SimpleElementPath
  - lxml.etree._TempStore
  - lxml.etree._Validator: Base class for XML validators.
    - lxml.etree.DTD: DTD(self, file=None, external_id=None) A DTD validator.
    - lxml.etree.RelaxNG: RelaxNG(self, etree=None, file=None) Turn a document into a Relax NG validator.
    - lxml.etree.Schematron: Schematron(self, etree=None, file=None) A Schematron validator.
    - lxml.etree.XMLSchema: XMLSchema(self, etree=None, file=None) Turn a document into an XML Schema validator.
  - lxml.etree._XPathEvaluatorBase
    - lxml.etree.XPath: XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True) A compiled XPath expression that can be called on Elements and ElementTrees.
      - lxml.cssselect.CSSSelector: A CSS selector.
      - lxml.etree.ETXPath: ETXPath(self, path, extensions=None, regexp=True) Special XPath class that supports the ElementTree {uri} notation for namespaces.
    - lxml.etree.XPathElementEvaluator: XPathElementEvaluator(self, element, namespaces=None, extensions=None, regexp=True, smart_strings=True) Create an XPath evaluator for an element.
      - lxml.etree.XPathDocumentEvaluator: XPathDocumentEvaluator(self, etree, namespaces=None, extensions=None, regexp=True, smart_strings=True) Create an XPath evaluator for an ElementTree.
  - basestring: Type basestring cannot be instantiated; it is the base for str and unicode.
    - str: str(object) -> string
      - lxml.etree._ElementStringResult
      - lxml.html.diff.token: Represents a diffable token, generally a word that is displayed to the user.
        - lxml.html.diff.href_token: Represents the href in an anchor tag.
        - lxml.html.diff.tag_token: Represents a token that is actually a tag.
    - unicode: unicode(string [, encoding[, errors]]) -> object
      - lxml.etree._ElementUnicodeResult
      - lxml.cssselect._UniToken
        - lxml.cssselect.String
        - lxml.cssselect.Symbol
        - lxml.cssselect.Token
      - lxml.html.diff.token: Represents a diffable token, generally a word that is displayed to the user.
        - lxml.html.diff.href_token: Represents the href in an anchor tag.
        - lxml.html.diff.tag_token: Represents a token that is actually a tag.
  - lxml.etree.iterwalk: iterwalk(self, element_or_tree, events=("end",), tag=None)
  - list: list() -> new list list(sequence) -> new list initialized from sequence's items
    - lxml.html.CheckboxGroup: Represents a group of checkboxes (`<input type=checkbox>`) that have the same name.
    - lxml.html.RadioGroup: This object represents several `<input type=radio>` elements that have the same name.