Monday, November 08, 2010 at 12:01 AM.


on extractUserInfo (adrstatus, adrtable, flnewtable=true) {
		<<5/21/09; 3:19:18 PM by DW
			<<Created. This code was being replicated, so I factored it.
	local (adruser = xml.getaddress (adrstatus, "user"));
	if flnewtable {
		new (tabletype, adrtable)};
	adrtable^.userId = xml.getvalue (adruser, "id");
	adrtable^.userName = xml.getvalue (adruser, "name");
	adrtable^.userScreenName = xml.getvalue (adruser, "screen_name");
	adrtable^.userLocation = xml.getvalue (adruser, "location");
	adrtable^.userDescription = xml.getvalue (adruser, "description");
	adrtable^.userProfileImageUrl = xml.getvalue (adruser, "profile_image_url");
	adrtable^.userUrl = xml.getvalue (adruser, "url");
	adrtable^.userFollowedBy = number (xml.getvalue (adruser, "followers_count")); //5/9/09 by DW
	adrtable^.userFollows = number (xml.getvalue (adruser, "friends_count")); //5/9/09 by DW
	adrtable^.userCtStatuses = number (xml.getvalue (adruser, "statuses_count")); //5/9/09 by DW
	adrtable^.flProtected = xml.getvalue (adruser, "protected")} //12/8/07 by DW
<<bundle //test code
	<<extractUserInfo (@scratchpad.xstructusertimeline.["00002000\tstatuses"].["00002000\tstatus"], @scratchpad.userinfo)

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.