Skip to content

User documentation? #489

@davaya

Description

@davaya

Is there any tutorial documentation for this package? Something that would answer questions like when parsing an HTML file:

with open(fname, 'rb') as f:
    doc = html5lib.parse(f)
for e in list(doc[0]):
    print(e.tag)

Why does the result look like this?

{http://www.w3.org/1999/xhtml}meta
{http://www.w3.org/1999/xhtml}title
{http://www.w3.org/1999/xhtml}link

A naive user would expect tag to return the literal value contained in the HTML element, not the tag prefixed with a qualifier of some sort. It would be helpful to have a document that explains why the prefix has been injected and how to configure the library to return unadorned tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions