Module Expr Str Import alias TryExcept body Import alias identifier handlers ExceptHandler body Import alias identifier Assign NameStore ListLoad Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults Str body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If BoolOpAnd UnaryOpNot Call NameLoad NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore ListComp Call AttributeLoad NameLoad attr Dict NameLoad NameLoad comprehension NameStore NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Delete NameDel Continue orelse If BoolOpAnd CompareIs NameLoad NameLoad CompareEq Str SubscriptLoad NameLoad Slice Num body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd CompareEq Str SubscriptLoad NameLoad Slice Num Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num If CompareIs NameLoad NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad orelse Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad orelse Assign NameStore IfExp CompareEq NameLoad AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad Assign NameStore BinOpAdd Str NameLoad If CompareIn NameLoad NameLoad body If Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Delete SubscriptDel NameLoad Index NameLoad orelse If CompareIs NameLoad NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Dict Str Str Str Str Str Dict Str Dict Str Str Dict Str Str Dict Str Str ListLoad Dict Str Str Str Num Str Str Dict Str Str Str Num Dict Str Str Str NameLoad Dict Str Str Dict Str Str Dict Str Str Str Str Dict Str Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str ListLoad Dict Str Str Str Str Str Str Str Str Str Str Str Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Str Str Str Str Str Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Str Str Str Str Dict Str Dict Str Str Str Str Str Str Dict Str Dict Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str For NameStore NameLoad body Assign NameStore Call NameLoad Print Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Print
N/A N/A 
Dict2XML: Convert python dict to xml string

@author: Mc.Spring
@contact: Heresy.Mc@gmail.com
@since: Created on 2009-5-18
@todo: Add namespace support
@copyright: Copyright (C) 2009 MC.Spring Team. All rights reserved.
@license: http://www.apache.org/licenses/LICENSE-2.0 Apache License
 N/A sys N/A N/A N/A xml.etree.ElementTree ET N/A N/A N/A N/A cElementTree ET N/A __all__ N/A Dict2XML Dict2XML N/A object N/A __init__ N/A N/A self coding N/A UTF-8 N/A N/A N/A self _root None N/A N/A self _coding coding N/A _parse_dict N/A N/A self edict etree N/A None N/A N/A tree None N/A N/A tag value N/A N/A edict items N/A N/A N/A N/A N/A isinstance value dict N/A N/A isinstance value list N/A N/A value N/A str value N/A N/A N/A etree None N/A isinstance value list N/A N/A elist N/A N/A N/A self _parse_dict N/A tag item N/A item value N/A et elist N/A N/A N/A N/A etree append et N/A elist N/A N/A N/A N/A N/A etree None N/A @ N/A tag N/A 1 N/A N/A etree tree N/A tree N/A N/A self _make_xml tag value etree N/A tree N/A _make_xml N/A N/A self tag value parent N/A N/A N/A Generate a new xml from the dict key and value

        The parent param is ET object
         N/A N/A N/A @ N/A tag N/A 1 N/A isinstance value dict N/A N/A tag N/A tag N/A 1 N/A N/A parent None N/A N/A N/A N/A self _root None N/A N/A el N/A N/A ET Element tag value N/A N/A self _root el N/A N/A el N/A self _root N/A N/A self _root None N/A N/A el N/A N/A tag N/A parent tag parent N/A N/A parent find tag N/A N/A el None N/A N/A el N/A N/A ET SubElement parent tag value N/A N/A N/A N/A N/A el attrib update value N/A el N/A stag N/A # tag N/A N/A stag value N/A N/A N/A isinstance N/A value N/A stag dict N/A N/A el N/A N/A ET Element tag N/A value N/A stag N/A N/A el N/A N/A ET Element tag N/A N/A value N/A stag N/A N/A N/A parent None N/A N/A N/A N/A self _root None N/A N/A el N/A N/A ET Element tag N/A N/A self _root el N/A N/A el N/A self _root N/A N/A self _root None N/A N/A el N/A N/A parent find tag N/A N/A el None N/A N/A el N/A N/A ET SubElement parent tag N/A N/A isinstance value dict N/A N/A N/A N/A self _parse_dict value el N/A N/A N/A el text value N/A el N/A parse N/A N/A self dict N/A N/A N/A Parse dict to xml string

        @attention: every dict must have a root key!
         N/A N/A N/A ET tostring N/A N/A self _parse_dict dict N/A N/A N/A N/A __name__ __main__ N/A N/A test N/A one two three four five N/A @class N/A id test N/A class @class N/A student bool N/A N/A age #student name 24 type thiru N/A age #student name 28 N/A id 5678 bharath True N/A id test N/A @rss rss N/A version author 2.0 Mc.Spring N/A channel N/A language link description copyright title item image generator webMaster en-us https://github.com/mcspring Hello,world. Copyright 2011-2012 Spring Mc. All rights reserved. Spring Mc N/A N/A category guid link @link pubDate author title description skill https://github.com/mcspring/googl.go https://github.com/mcspring/googl.go N/A target _blank Mon, 13 Apr 2011 02:04:52 +0800 Heresy.Mc@gmail.com(Spring Mc) This is googl.go proejct This is the first project written in go, thanks! N/A category guid link @link pubDate author title description skill https://github.com/mcspring/XML2Dict https://github.com/mcspring/XML2Dict N/A target _blank Mon, 15 Apr 2009 02:04:52 +0800 Heresy.Mc@gmail.com(Spring Mc) This is XML2Dict project This is the first project written in python, thanks! N/A url link description title https://github.com/mcspring/logo.gif https://github.com/mcspring/ Spring Mc Spring on github XmlSave 2.0 Heresy.Mc@gmail.com(Spring) N/A person N/A age name address spring N/A doc N/A x N/A N/A #x N/A a 1 N/A #x N/A a 2 N/A item test N/A N/A obj N/A Dict2XML N/A N/A N/A obj parse N/A test N/A item N/A