XmlWriter — Converts in-memory ADMIT objects to XML format.¶
This module defines the main XML writer class for ADMIT.
-
class
admit.xmlio.XmlWriter.
XmlWriter
(clss, order, btype, root, keys=None)[source]¶ XML Writer class.
Class for writing out xml instances of both ATs and BDPs.
Parameters: clss : various
The class to be written out in XML.
order : list
The order items are written in.
btype : dict
Dictionary of the data type for each item.
root : elementtree node
The root node to attach to.
keys : list
A list of the keywords for an AT. Default: None.
Attributes
None Methods
write
(attr, item, btype, root, typ)Method to write out an individual item to XML writexml
(clss, order, btype, root, keys)Method to loop through all data members in the dtd and write them to XML -
write
(attr, item, btype, root, typ)[source]¶ Method to write out an individual item to XML
Parameters: attr : various
The value of the item to write out
item : str
The name of the item to write out
btype : dict
Dictionary of the data types for each item
root : elementtree
The root node to attach to
typ : str
String containing the type of class being written out. Used only for error messages
Returns: None
-
writexml
(clss, order, btype, root, keys)[source]¶ Method to loop through all data members in the dtd and write them to XML
Parameters: clss : various
The class to be written out in XML
order : list
The order items are written in
btype : dict
Dictionary of the data type for each item
root : elementtree node
The root node to attach to
keys : list
A list of the keywrods for an AT
Returns: None
-