b.x.XMLSerializer(Serializer) : class documentation

Part of bzrlib.xml_serializer View In Hierarchy

Known subclasses: bzrlib.plugins.weave_fmt.xml4._Serializer_v4, bzrlib.xml8.Serializer_v8

Abstract XML object serialize/deserialize
Method read_inventory_from_string Read xml_string into an inventory object.
Method read_inventory See read_inventory_from_string.
Method write_revision Undocumented
Method write_revision_to_string Undocumented
Method read_revision Undocumented
Method read_revision_from_string Undocumented
Method _write_element Undocumented
Method _read_element Undocumented

Inherited from Serializer:

Method write_inventory Write inventory to a file.
Method write_inventory_to_string Produce a simple string representation of an inventory.
def read_inventory_from_string(self, xml_string, revision_id=None, entry_cache=None, return_from_cache=False):
Read xml_string into an inventory object.
Parametersxml_stringThe xml to read.
revision_idIf not-None, the expected revision id of the inventory. Some serialisers use this to set the results' root revision. This should be supplied for deserialising all from-repository inventories so that xml5 inventories that were serialised without a revision identifier can be given the right revision id (but not for working tree inventories where users can edit the data without triggering checksum errors or anything).
entry_cacheAn optional cache of InventoryEntry objects. If supplied we will look up entries via (file_id, revision_id) which should map to a valid InventoryEntry (File/Directory/etc) object.
return_from_cacheReturn entries directly from the cache, rather than copying them first. This is only safe if the caller promises not to mutate the returned inventory entries, but it can make some operations significantly faster.
def read_inventory(self, f, revision_id=None):
See read_inventory_from_string.
def write_revision(self, rev, f):
Undocumented
def write_revision_to_string(self, rev):
Undocumented
def read_revision(self, f):
Undocumented
def read_revision_from_string(self, xml_string):
Undocumented
def _write_element(self, elt, f):
Undocumented
def _read_element(self, f):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.