support des noeuds de type texte

This commit is contained in:
Jephte CLAIN 2014-11-26 07:13:50 +04:00
parent 5f42e14d75
commit 13b97d61d2
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@ def dumprs(rs):
for r in rs: dumprs(r) for r in rs: dumprs(r)
elif isinstance(rs, minidom.Element): elif isinstance(rs, minidom.Element):
print rs.toxml("utf-8") print rs.toxml("utf-8")
elif isinstance(rs, minidom.Text):
print rs.data.encode("utf-8")
elif isinstance(rs, minidom.Attr): elif isinstance(rs, minidom.Attr):
print rs.value.encode("utf-8") print rs.value.encode("utf-8")
else: else: