Package backend :: Package satellite_tools :: Package exporter :: Module xmlWriter :: Class XMLWriter
[hide private]
[frames] | no frames]

Class XMLWriter

source code

XML writer, UTF-8 aware

Instance Methods [hide private]
 
__init__(self, stream=sys.stdin, skip_xml_decl=0) source code
 
open_tag(self, name, attributes=None, namespace=None)
Opens a tag with the specified attributes
source code
 
empty_tag(self, name, attributes=None, namespace=None)
Writes an empty tag with the specified attributes
source code
 
_open_tag(self, empty, name, attributes=None, namespace=None) source code
 
close_tag(self, name, namespace=None)
Closes a previously open tag.
source code
 
data(self, data_string)
Writes the data, performing the necessary UTF-8 conversions max_bytes is the satellite schema dependent maximum value (in bytes) which can fit in the matching table row.
source code
 
_sub_function(self, match_object) source code
 
flush(self) source code
Class Variables [hide private]
  _re = re.compile(r'(&|<|>|\'|"|[^\t\n\r -\xff])')
  _escaped_chars = {'"': '&quot;', '&': '&amp;', '\'': '&apos;',...
Method Details [hide private]

close_tag(self, name, namespace=None)

source code 

Closes a previously open tag. This function raises an exception if the tag was not opened before, or if it's been closed already.

data(self, data_string)

source code 

Writes the data, performing the necessary UTF-8 conversions max_bytes is the satellite schema dependent maximum value (in bytes) which can fit in the matching table row. Yeah, this is very gross.


Class Variable Details [hide private]

_escaped_chars

Value:
{'"': '&quot;',
 '&': '&amp;',
 '\'': '&apos;',
 '<': '&lt;',
 '>': '&gt;'}