generic.xml not recursive?

19 views
Skip to first unread message

lucas

unread,
Dec 12, 2017, 12:34:34 PM12/12/17
to web2py-users
hey one and all,

i'm using web2py 2.16.1.

i have a set of nested dicts in a primary dict.  and i convert it using generic.xml.  but it only converts the first layer of dict variables and the nested dicts are left as strings.  how can this be fixed or used to get the converter to go and convert the nested dicts also?

thank you in advance, lucas

lucas

unread,
Dec 12, 2017, 12:52:51 PM12/12/17
to web2py-users
its weird because the nested dicts look xml parsed, and when you view it in firefox or safari, it just looks like a concatenated string of xml tags and values, and the browser doesn't parse them into individual tags and values.  so i tried see what beautifulsoup did with the parsing of the nested dicts and its shows the < and > as &lt; and &gt; strings.

lucas

unread,
Dec 12, 2017, 1:08:23 PM12/12/17
to web2py-users
ok ok, i'm a dumbbutt,

i was passing a type Row instead of a pure dict.  so i did xx.as_dict(), where xx is the Row object, and generic.xml parsed all of the nested dicts fine.

lucas
Reply all
Reply to author
Forward
0 new messages