Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.soap.encode.struct
on struct (adrmsg, structvalue, adrparent, name, customStructType=nil, customNamespace=nil, customNamespaceURI=nil, flEntityEncodeHighAscii=false) { <<Changes: <<04/03/01; 7:49:41 PM by JES <<New optional parameter, flEntityEncodeHighAscii, specifies whether to entity-encode high-ascii characters when encoding strings. Default is false. This is passed to soap.encode.main. <<04/07/01; 7:24:56 PM by JES <<Changed name of customArrayType parameter to customStructType. Pass customStructType, customNamespace and customNamespaceURI in the call to soap.encode.main. local (adrelement = soap.xmlutils.addElement (adrparent, name)); if customStructType != nil { if customNamespace == nil { scriptError ("Can't encode the struct because a type was specified, but no namespace prefix was given.")}; if customNamespaceURI == nil { scriptError ("Can't encode the struct because a type was specified, but no namespaceURI was given.")}; soap.xmlutils.declareNamespaceInElement (adrelement, customNamespace, customNamespaceURI); soap.xmlutils.addAttributeValue (adrelement, soap.constants.nsSchemaPrefix + ":type", customNamespace + ":" + customStructType)}; if sizeOf (structvalue) > 0 { for adritem in @structvalue { soap.encode.main (adrmsg, adritem^, adrelement, nameOf (adritem^), customStructType, customNamespace, customNamespaceURI, flEntityEncodeHighAscii)}} else { table.assign (adrelement, "")}; return (adrelement)}
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.