Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.soap.decode.struct
on struct (adrmsg, adrelement, flEnforceSimpleTypes=true) {
<<Changes:
<<04/06/01; 12:44:43 PM by JES
<<New optional parameter, flEnforceSimpleTypes, specifies whether to fault on elements whose type is not specified. This is passed to soap.decode.main.
local (resulttable);
new (tableType, @resulttable);
local (nomad = soap.xmlutils.getFirstChildElement (adrelement));
while nomad {
local (name = soap.xmlutils.getElementName (nomad));
if defined (resulttable.[name]) {
scripterror ("Can't decode element of \"" + soap.xmlutils.getElementName (adrelement) + "\" struct because the element name \"" + name + "\" is already in use.")};
resulttable.[name] = soap.decode.main (adrmsg, nomad, flEnforceSimpleTypes);
nomad = soap.xmlutils.getNextSiblingElement (nomad)};
return (resulttable)}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.