Common utility classes and functions used throughout libtaxii.
Return the XML parser currently in use.
If one has not already been set (via set_xml_parser()), a new etree.XMLParser is constructed with no_network=True and huge_tree=True.
Set the libtaxii.messages XML parser.
Parameters: | xml_parser (etree.XMLParser) – The parser to use to parse TAXII XML. |
---|
Base class for all TAXII Messages and Message component types.
libtaxii users should not need to use this class directly.
Generic method used to check equality of objects of any TAXII type.
Also allows for print-based debugging output showing differences.
In order for subclasses to use this function, they must meet the following criteria: 1. All class properties start with one underscore. 2. The sort_key property is implemented.
Parameters: |
|
---|
Create an instance of this class from a dictionary.
Subclasses must implement this method.
Create an instance of this class from an etree.
Subclasses must implement this method.
Create an instance of this class from XML.
Subclasses should not need to implement this method.
This property allows list of TAXII objects to be compared efficiently. The __eq__ method uses this property to sort the lists before comparisons are made.
Subclasses must implement this property.
Create a dictionary representation of this class.
Subclasses must implement this method.
Create an etree representation of this class.
Subclasses must implement this method.
Create a nice looking (this is a subjective term!) textual representation of this class. Subclasses should implement this method.
Note that this is just a convenience method for making TAXII Messages nice to read for humans and may change drastically in future versions of libtaxii.
Create an XML representation of this class.
Subclasses should not need to implement this method.