Package advene :: Package model :: Package serializers :: Module advene_xml
[hide private]
[frames] | no frames]

Module advene_xml

source code

Generic serializer implementation.

Note that the order chosen for XML elements (imports, tags, medias, resources, annotations, relations, views, queries, lists) is designed to limit the number of forward references, which makes the work of the parser more difficult. Forward references are nevetheless still possible in meta-data, tag associated to another tag, list containing another list

Classes [hide private]
  _Serializer
Functions [hide private]
 
make_serializer(package, file_)
Return a serializer that will serialize `package` to `file_`.
source code
 
serialize_to(package, file_)
A shortcut for ``make_serializer(package, file_).serialize()``.
source code
 
_indent(elem, level=0)
from http://effbot.org/zone/element-lib.htm#prettyprint
source code
 
_split_uri_ref(uriref) source code
Variables [hide private]
  NAME = 'Generic Advene XML'
  EXTENSION = '.bxp'
  MIMETYPE = 'application/x-advene-bxp'
Function Details [hide private]

make_serializer(package, file_)

source code 

Return a serializer that will serialize `package` to `file_`.

`file_` is a writable file-like object. It is the responsability of the caller to close it.

The returned object must implement the interface for which :class:`_Serializer` is the reference implementation.

serialize_to(package, file_)

source code 

A shortcut for ``make_serializer(package, file_).serialize()``.

See also `make_serializer`.