Package suds :: Module reader :: Class DocumentReader
[hide private]
[frames] | no frames]

Class DocumentReader

source code

Reader --+
         |
        DocumentReader

The XML document reader provides an integration between the SAX Parser and the document cache.

Instance Methods [hide private]
Document
open(self, url)
Open an XML document at the specified url.
source code
file-like
download(self, url)
Download the docuemnt.
source code
Cache
cache(self)
Get the cache.
source code

Inherited from Reader: __init__, mangle

Instance Variables [hide private]

Inherited from Reader: options

Method Details [hide private]

open(self, url)

source code 

Open an XML document at the specified url. First, the document attempted to be retrieved from the object cache. If not found, it is downloaded and parsed using the SAX parser. The result is added to the cache for the next open().

Parameters:
  • url (str.) - A document url.
Returns: Document
The specified XML document.

download(self, url)

source code 

Download the docuemnt.

Parameters:
  • url (str.) - A document url.
Returns: file-like
A file pointer to the docuemnt.

cache(self)

source code 

Get the cache.

Returns: Cache
The options when cachingpolicy = 0.