diff options
| author | Craig Blaszczyk | 2011-12-11 18:27:40 +0000 |
|---|---|---|
| committer | Craig Blaszczyk | 2011-12-11 18:27:40 +0000 |
| commit | 0632e946f977609ca6d6f4272f02c72dee1f49be (patch) | |
| tree | b63fecb4220086fa5a673ce1a2780f86682110f9 /djangorestframework/utils/__init__.py | |
| parent | b71a24437a3504b3edf19153576d5a2e92c84bd2 (diff) | |
| download | django-rest-framework-0632e946f977609ca6d6f4272f02c72dee1f49be.tar.bz2 | |
add xml parser
Diffstat (limited to 'djangorestframework/utils/__init__.py')
| -rw-r--r-- | djangorestframework/utils/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/djangorestframework/utils/__init__.py b/djangorestframework/utils/__init__.py index 99f9724c..04baea78 100644 --- a/djangorestframework/utils/__init__.py +++ b/djangorestframework/utils/__init__.py @@ -150,6 +150,10 @@ class XMLRenderer(): xml.startElement(key, {}) self._to_xml(xml, value) xml.endElement(key) + + elif data is None: + # Don't output any value + pass else: xml.characters(smart_unicode(data)) @@ -168,4 +172,4 @@ class XMLRenderer(): return stream.getvalue() def dict2xml(input): - return XMLRenderer().dict2xml(input) + return XMLRenderer().dict2xml(input)
\ No newline at end of file |
