Monday, November 08, 2010 at 12:01 AM.
system.verbs.apps.s3.simpleDb.getOneAttribute
on getOneAttribute (domain, itemName, attName, adrval, adrerrorstring=nil) { <<Changes <<1/12/08; 9:40:25 AM by DW <<Created. local (t, xstruct); new (tabletype, @t); t.DomainName = domain; t.ItemName = itemName; t.AttributeName = attName; if s3.simpleDb.httpClient ("GetAttributes", @t, adrerrorstring, @xstruct) { local (adrresponse = xml.getaddress (@xstruct, "GetAttributesResponse")); local (adrresult = xml.getaddress (adrresponse, "GetAttributesResult"), adr); for adr in adrresult { if nameof (adr^) endswith "Attribute" { adrval^ = xml.getvalue (adr, "Value"); return (true)}}}; return (false)}; bundle { //test code local (es, attval); if getOneAttribute ("flickrFanData", "Dave Winer", "whenFirstPing", @attval, @es) { dialog.alert (attval)} else { dialog.alert (es)}}
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.