## Summary of WebUtils.HTMLTag

You can also browse the complete source file or the generated documentation.

    class HTMLTagError(Exception):
        def __init__(self, msg, **values)

    class HTMLTagAttrLookupError(HTMLTagError, LookupError): pass

    class HTMLTag:

        ## Init and reading ##
        def __init__(self, name, lineNumber=None)
        def readAttr(self, name, value)
        def addChild(self, child)

        ## Access ##
        def name(self)
        def attr(self, name, default=NoDefault)
        def hasAttr(self, name)
        def attrs(self)
        def numAttrs(self)
        def childAt(self, index)
        def numChildren(self)
        def children(self)
        def subtagAt(self, index)
        def numSubtags(self)
        def subtags(self)

        ## Printing ##
        def pprint(self, out=None, indent=0)
        def __repr__(self)

        ## Searching ##
        def tagWithMatchingAttr(self, name, value, default=NoDefault)
        def tagWithId(self, id, default=NoDefault)

        ## Parsing (HTMLReader) ##
        def closedBy(self, name, lineNumber)

        ## Self utility ##

    class HTMLReader(SGMLParser):

        ## Init ##
        def __init__(self, emptyTags=None, extraEmptyTags=None, fakeRootTagIfNeeded=True)

        ## Reading ##
        def readFileNamed(self, filename, retainRootTag=True)
        def readString(self, string, retainRootTag=True)

        ## Printing ##
        def pprint(self, out=None)

        ## Access ##
        def rootTag(self)
        def filename(self)
        def emptyTags(self)
        def setEmptyTags(self, tagList)
        def extendEmptyTags(self, tagList)

        ## Debugging ##
        def printsStack(self)
        def setPrintsStack(self, flag)

        ## Command line ##
        def main(self, args=None)
        def usage(self)

        ## SGMLParser handlers ##
        def handle_data(self, data)
        def handle_pi(self, data)
        def unknown_starttag(self, name, attrs)
        def unknown_endtag(self, name)
        def close(self)

        ## Self utility ##
        def computeTagContainmentConfig(self)

        ## Optimizations ##

    class TagConfig:
        def __init__(self, name, tags)
        def encounteredTag(self, tag, lineNum)

    class TagCanOnlyHaveConfig(TagConfig):
        def encounteredTag(self, tag, lineNum)

    class TagCannotHaveConfig(TagConfig):
        def encounteredTag(self, tag, lineNum)