Python: module xmlout

xmlout | index /build/dshell/src/dshell/lib/output/xmlout.py

`@author: tparker`

Modules
`` |  |
xml.etree.ElementTree | dshell | output | util

Classes
`` |  | output.FileOutput(output.Output) XMLOutput
class XMLOutput(output.FileOutput)
`` | `XMLOutput Module`
| Method resolution order: XMLOutput output.FileOutput output.Output __builtin__.object Methods defined here: __init__(self, *args, **kwargs) `init the underlying file output to get the file handle` alert(self, *args, **kwargs) `we will assume we get alerts before we get the matching session data` close(self) `write the ElementTree to the file` write(self, obj, parent=None, **kwargs) `write the object data under the last alert element (or the root if no alert) if a conn object recurse in by iterating else write the string output of the object` Methods inherited from output.Output: dispatch(self, m, *args, **kwargs) `dispatch from Q pop` dump(self, pkt=None, **kw) `dump raw packet data to an output override this if you want a format other than pcap` log(self, msg, level=20, *args, **kw) `write a message to the log passes all args and kwargs thru to logging except for level= is used to set logging level` parse(self, *args, **kw) `parse the input args/kwargs into a record dict according to format string - timestamps are formatted to date/time strings - fields not in the input will be defined but blank - extra fields in the record will be formatted into a "name=value name2=value2..." string and put in 'extra' - args will go into 'data' - format keyword can contain a new format string to use (this also sets format for future output)` setformat(self, formatstr=None, typemap=None) `parse a format string and extract the field info if no string given, reverts to default for class will set self.fields to be a list of (name,type,spec) tuples self.fieldnames to a list of fieldnames and self.fieldmap to a list of key=in value=out mappings format string can also map in field to out field with %(in:out)spectype or specify an explicit out type with %(in:out)specintype:outtype (note this breaks compatibility with text formatting, but useful for db or other output modules) a typemap of [intype]=outtype (or [in]=(newintype,outtype) can be used to map and replace types` setup(self) `Perform any additional setup outside of the standard __init__. Runs after command-line arguments are parsed, but before decoders are run. For example, printing header data to the outfile.` Data descriptors inherited from output.Output: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`
obj = class XMLOutput(output.FileOutput)
`` | `XMLOutput Module`
| Method resolution order: XMLOutput output.FileOutput output.Output __builtin__.object Methods defined here: __init__(self, *args, **kwargs) `init the underlying file output to get the file handle` alert(self, *args, **kwargs) `we will assume we get alerts before we get the matching session data` close(self) `write the ElementTree to the file` write(self, obj, parent=None, **kwargs) `write the object data under the last alert element (or the root if no alert) if a conn object recurse in by iterating else write the string output of the object` Methods inherited from output.Output: dispatch(self, m, *args, **kwargs) `dispatch from Q pop` dump(self, pkt=None, **kw) `dump raw packet data to an output override this if you want a format other than pcap` log(self, msg, level=20, *args, **kw) `write a message to the log passes all args and kwargs thru to logging except for level= is used to set logging level` parse(self, *args, **kw) `parse the input args/kwargs into a record dict according to format string - timestamps are formatted to date/time strings - fields not in the input will be defined but blank - extra fields in the record will be formatted into a "name=value name2=value2..." string and put in 'extra' - args will go into 'data' - format keyword can contain a new format string to use (this also sets format for future output)` setformat(self, formatstr=None, typemap=None) `parse a format string and extract the field info if no string given, reverts to default for class will set self.fields to be a list of (name,type,spec) tuples self.fieldnames to a list of fieldnames and self.fieldmap to a list of key=in value=out mappings format string can also map in field to out field with %(in:out)spectype or specify an explicit out type with %(in:out)specintype:outtype (note this breaks compatibility with text formatting, but useful for db or other output modules) a typemap of [intype]=outtype (or [in]=(newintype,outtype) can be used to map and replace types` setup(self) `Perform any additional setup outside of the standard __init__. Runs after command-line arguments are parsed, but before decoders are run. For example, printing header data to the outfile.` Data descriptors inherited from output.Output: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`

Data
`` |  | __warningregistry__ = {("Not importing directory '/build/dshell/src/dshell/lib/output': missing __init__.py", <type 'exceptions.ImportWarning'>, 5): True}