mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
Cleaning libxml2 artifact.convert to lxml
This commit is contained in:
parent
41b80bc719
commit
8b347c1024
1 changed files with 0 additions and 8 deletions
|
@ -86,12 +86,9 @@ def get_xml_path(xml, path=None, func=None):
|
||||||
of a passed function (receives xpathContext as its only arg)
|
of a passed function (receives xpathContext as its only arg)
|
||||||
"""
|
"""
|
||||||
doc = None
|
doc = None
|
||||||
#ctx = None
|
|
||||||
result = None
|
result = None
|
||||||
|
|
||||||
#try:
|
|
||||||
doc = etree.fromstring(xml)
|
doc = etree.fromstring(xml)
|
||||||
#ctx = doc.xpathNewContext()
|
|
||||||
if path:
|
if path:
|
||||||
result = get_xpath(doc, path)
|
result = get_xpath(doc, path)
|
||||||
|
|
||||||
|
@ -100,11 +97,6 @@ def get_xml_path(xml, path=None, func=None):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise ValueError("'path' or 'func' is required.")
|
raise ValueError("'path' or 'func' is required.")
|
||||||
#finally:
|
|
||||||
#if doc:
|
|
||||||
# doc.freeDoc()
|
|
||||||
#if ctx:
|
|
||||||
# ctx.xpathFreeContext()
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue