Package Bio :: Package Entrez :: Module Parser :: Class DataHandler
[hide private]
[frames] | no frames]

Class DataHandler

source code

object --+
         |
        DataHandler

Instance Methods [hide private]
 
__init__(self, validate)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
read(self, handle)
Set up the parser and let it parse the XML results
source code
 
parse(self, handle) source code
 
xmlDeclHandler(self, version, encoding, standalone) source code
 
startNamespaceDeclHandler(self, prefix, un) source code
 
startElementHandler(self, name, attrs) source code
 
endElementHandler(self, name) source code
 
characterDataHandler(self, content) source code
 
elementDecl(self, name, model)
This callback function is called for each element declaration: <!ELEMENT name (...)> encountered in a DTD.
source code
 
open_dtd_file(self, filename) source code
 
save_dtd_file(self, filename, text) source code
 
externalEntityRefHandler(self, context, base, systemId, publicId)
The purpose of this function is to load the DTD locally, instead of downloading it from the URL specified in the XML.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  local_dtd_dir = '/home/pc40583/.config/biopython/Bio/Entrez/DTDs'
  global_dtd_dir = '/usr/lib64/python2.6/site-packages/Bio/Entre...
  exception = OSError(17, 'File exists')
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, validate)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

elementDecl(self, name, model)

source code 
This callback function is called for each element declaration: <!ELEMENT name (...)> encountered in a DTD. The purpose of this function is to determine whether this element should be regarded as a string, integer, list dictionary, structure, or error.

externalEntityRefHandler(self, context, base, systemId, publicId)

source code 
The purpose of this function is to load the DTD locally, instead of downloading it from the URL specified in the XML. Using the local DTD results in much faster parsing. If the DTD is not found locally, we try to download it. If new DTDs become available from NCBI, putting them in Bio/Entrez/DTDs will allow the parser to see them.

Class Variable Details [hide private]

global_dtd_dir

Value:
'/usr/lib64/python2.6/site-packages/Bio/Entrez/DTDs'