only support reading xinclude if we are using lxml
This commit is contained in:
parent
594b019879
commit
b4e989a85a
1 changed files with 2 additions and 1 deletions
|
@ -87,7 +87,8 @@ if __name__ == "__main__":
|
|||
|
||||
xml = sys.argv[1]
|
||||
tree = etree.parse(xml)
|
||||
tree.xinclude()
|
||||
if hasattr(tree,'xinclude')
|
||||
tree.xinclude()
|
||||
root = tree.getroot()
|
||||
|
||||
# rename 'bgcolor' to 'background-color'
|
||||
|
|
Loading…
Reference in a new issue