Streaming SAX handler for the output of condor_* -xml calls; it's
around 60 times faster and has a similar reduction in required
memory.
Use this as a ContentHandler for a SAX parser; call getJobInfo
afterward to get the information about each job.
getJobInfo returns a dictionary of jobs; the key for the dictionary is
the Condor attribute passed in as 'idx' to the constructor; the value is
another dictionary of key-value pairs from the condor JDL, where the keys
is in the attribute list passed to the constructor.
|
|
|
|
|
|
|
|
|
|
|
startElement(self,
name,
attrs)
Open an XML element - take note if its a 'c', for the start of a new
classad, or an 'a', the start of a new attribute. |
source code
|
|
|
|
|
|
|
|
|
|
getClassAds(self)
Returns a dictionary of dictionaries consisting of all the classAds
and their attributes. |
source code
|
|
|
Inherited from xml.sax.handler.ContentHandler:
endElementNS,
endPrefixMapping,
ignorableWhitespace,
processingInstruction,
setDocumentLocator,
skippedEntity,
startElementNS,
startPrefixMapping
|