Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)
Convert an XML document to a WORK object

WORK is documented here:
http://code.davidjanes.com/blog/2008/11/11/work-web-object-records/

If your API doesn't return anything, it's likely the data as stored 
as attributes and you should set 'keep_attributes' to True

src/n/e/newscredit_api-HEAD/locallibs/aump/api_download.py   newscredit_api(Download)
class XML(Downloaders):
	"""Download an XML document, only using the text between tags as data"""
 
	_convert2work = bm_work.XML2WORK(keep_attributes = False)
	_item_path = ""
class XMLAttributes(Downloaders):
	"""Download an XML document, preserving attributes (as '@' attributes)"""
 
	_convert2work = bm_work.XML2WORK(keep_attributes = True)
	_item_path = ""
class XMLAttributesAsText(Downloaders):
	"""Download an XML document, treating attributes as nodes"""
 
	_convert2work = bm_work.XML2WORK(keep_attributes = True, attribute_prefix = '')
	_item_path = ""

src/n/e/newscredit_api-HEAD/locallibs/aump/api_opml.py   newscredit_api(Download)
class OPML(bm_api.APIReader):
	_item_path = "body.outline"
	_meta_path = "head"
	_uri_param = True
	_convert2work = bm_work.XML2WORK(keep_attributes = True, attribute_prefix = '')

src/n/e/newscredit_api-HEAD/locallibs/aump/api_delicious.py   newscredit_api(Download)
class Delicious(bm_api.APIReader):
	_convert2work = bm_work.XML2WORK(keep_attributes = True, attribute_prefix = '')
	_meta_removes = [ "post" ]
	_atom_item = {
		"content" : "extended", 

src/n/e/newscredit_api-HEAD/locallibs/aump/bm_api.py   newscredit_api(Download)
class APIReader(APIBase):
	"""Base class APIs that directly downloads a URI and may have paged results"""
 
	_convert2work = bm_work.XML2WORK()
	_inject_position = True