summaryrefslogtreecommitdiff
path: root/addons/web/common/xml2json.py
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-10-10 22:44:51 +0200
committerAntony Lesuisse <al@openerp.com>2012-10-10 22:44:51 +0200
commit07e1fba67d44b7906ff42e5145aff3941e790c99 (patch)
tree46fb16d6e87795dc9817af72edbbee4e375748b9 /addons/web/common/xml2json.py
parentceb6078a7739ab4a6a8c3ded9d5a80e33578fad6 (diff)
parentae6ff0764b709880c458c54a850594db8eed795a (diff)
[MERGE] remove standalone web client
bzr revid: al@openerp.com-20121010204451-nq3eatsl1x9zi1cf
Diffstat (limited to 'addons/web/common/xml2json.py')
-rw-r--r--addons/web/common/xml2json.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/addons/web/common/xml2json.py b/addons/web/common/xml2json.py
deleted file mode 100644
index df3aad67fa5..00000000000
--- a/addons/web/common/xml2json.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# xml2json-direct
-# Simple and straightforward XML-to-JSON converter in Python
-# New BSD Licensed
-#
-# URL: http://code.google.com/p/xml2json-direct/
-
-def from_elementtree(el, preserve_whitespaces=False):
- res = {}
- if el.tag[0] == "{":
- ns, name = el.tag.rsplit("}", 1)
- res["tag"] = name
- res["namespace"] = ns[1:]
- else:
- res["tag"] = el.tag
- res["attrs"] = {}
- for k, v in el.items():
- res["attrs"][k] = v
- kids = []
- if el.text and (preserve_whitespaces or el.text.strip() != ''):
- kids.append(el.text)
- for kid in el:
- kids.append(from_elementtree(kid, preserve_whitespaces))
- if kid.tail and (preserve_whitespaces or kid.tail.strip() != ''):
- kids.append(kid.tail)
- res["children"] = kids
- return res