XML decoder

This submodule is used to parse metadata from XML (.xml) files.

Format schema:

<root>
    <item key="key">value</item>
</root>

Example of valid data:

<root>
    <item key="ISBN knihy">80-86056-31-7</item>
    <item key="Vazba knihy">brož.</item>
    <item key="Nazev knihy">standalone2.xml</item>
    <item key="Misto vydani">Praha</item>
    <item key="Nakladatel">Garda</item>
    <item key="Datum vydani">09/2012</item>
    <item key="Poradi vydani">1</item>
    <item key="Zpracovatel zaznamu">Franta Putsalek</item>
</root>

See Required fields for list of required fields.

ftp.decoders.parser_xml.decode(data)[source]

Handles decoding of the XML data.

Parameters:data (str) – Data which will be decoded.
Returns:Dictionary with decoded data.
Return type:dict