Searched refs:etree (Results 1 – 4 of 4) sorted by relevance
20 import lxml.etree as etree namespace62 root = etree.Element('resources')63 root.addprevious(etree.Comment(COPYRIGHT_STR))64 root.addprevious(etree.Comment(AUTOGENERATION_NOTICE_STR))65 overlayable = etree.SubElement(root, 'overlayable')67 policy = etree.SubElement(overlayable, 'policy')70 item = etree.SubElement(policy, 'item')73 data = etree.ElementTree(root)75 print(etree.tostring(data, pretty_print=True, xml_declaration=True).decode())
20 import lxml.etree as etree namespace65 root = etree.Element('overlay')66 root.addprevious(etree.Comment(COPYRIGHT_STR))67 root.addprevious(etree.Comment(AUTOGENERATION_NOTICE_STR))69 item = etree.SubElement(root, 'item')72 rootTree = etree.ElementTree(root)74 print(etree.tostring(rootTree, pretty_print=True, xml_declaration=True).decode())
18 import lxml.etree as etree namespace92 doc = etree.parse(filename)96 if resource.tag is etree.Comment:
10 import xml.etree.ElementTree as ET