You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While CSV are one type of file format that are used for data exchange. The other one which is most famous is XML.
XML files are used as internal data format and exchange format.
Also a lot of metadata profils and data formats in the cultural heritage sector are serialized in XML:
e.g. LIDO, MODS, METS, PREMIS, MARCXML, PICAXML, DC, ONIX and so on.
XML is decoded a little bit differently than other data formats since on the one hand
the decoder follows straight after the opening of a file, a website or an OAI-PMH.
But to decode it as xml we have to use the decode-xml command. But using only the decoder does not help. We additionally need a handler for xml.
Handlers a specific helpers that decode xml in a certain way, based on the metadata standard that this xml is based on.
What is special about the handling, it that the values of the different xml-elements are not decoded straigt as the value of the element but as a subfield called value.
This is due to the fact that xml element cant have a value and additional attributes and to catch both MF introduces subfields for the value and potential attributes:
The value subfields are also kept. Keep in mind that xml elements can have attributes and a value. But also the encoder enable simple flat xml records too.
You have to add a specific option when encoding xml: (valueTag="value")
If you want to create the other elements as attributes. You have to tell MF which elements are attributes by adding a attributeMarker with the option attributemarker in handle generic xml.
Here I use @ as attribute marker:
Another important thing, when working with xml data sets is to specify the record tag. Default is the tag record. But other data sets have different tags that separate records: