[DOCS] use etree to fix docs generated by doxygen (#20011)

This commit is contained in:
jmacekx
2023-09-25 10:39:26 +02:00
committed by GitHub
parent 3aa125cb6c
commit 83d9131aba

View File

@@ -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')