html ¤
Functions:
-
parse_document_or_nodes–Use this if you do NOT know whether the given HTML is a full document
-
parse_multiroot_html–Use this when you know the given HTML is a multiple nodes like
-
parse_node–Use this when you know the given HTML is a single node like
parse_document_or_nodes ¤
Use this if you do NOT know whether the given HTML is a full document with <html>, <head>, and <body> tags, or an HTML fragment.
Source code in src/django_components/util/html.py
parse_multiroot_html ¤
Use this when you know the given HTML is a multiple nodes like
<div> Hi </div> <span> Hello </span>
Source code in src/django_components/util/html.py
parse_node ¤
parse_node(html: str) -> LexborNode
Use this when you know the given HTML is a single node like
<div> Hi </div>