diff --git a/docs/scripts/prepare_xml.py b/docs/scripts/prepare_xml.py index 2a14121a2e6..dc4e1a18f79 100644 --- a/docs/scripts/prepare_xml.py +++ b/docs/scripts/prepare_xml.py @@ -4,7 +4,6 @@ import re import logging import argparse -import lxml.html from lxml import etree from pathlib import Path from xml.sax import saxutils @@ -29,7 +28,7 @@ def prepare_xml(xml_dir: Path): # escape asterisks contents = contents.replace('*', '\\*') contents = str.encode(contents) - root = lxml.html.fromstring(contents) + root = etree.fromstring(contents) # unescape * in sphinxdirectives sphinxdirectives = root.xpath('//sphinxdirective')