Катин файл

This commit is contained in:
Dmitry
2026-03-18 17:54:53 +03:00
parent 01577d5542
commit 731c689d41
9 changed files with 5541 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
from lxml import etree
# загружаем XML
xml = etree.parse("specialities.xml")
# загружаем XSLT
xslt = etree.parse("specialities.xsl")
# создаем трансформацию
transform = etree.XSLT(xslt)
# применяем
result = transform(xml)
# сохраняем HTML
with open("specialities.html", "wb") as f:
f.write(etree.tostring(result, pretty_print=True, encoding="UTF-8"))
print("HTML успешно создан: specialities.html")