yujota / elm-pascal-voc / PascalVoc.Decode

Decoder for Pascal VOC XML format

Decoder

decodeString : String -> Result String PascalVoc.Internal.PascalVoc

Decode Pascal Vox XML format to PascalVoc.

xmlString = """
<annotation>
  <filename>000001.png</filename>
  <size>
    <width>224</width>
    <height>224</height>
    <depth>3</depth>
  </size>
</annotation>
"""
decoded = decodeString xmlString
Result.map PascalVoc.filename decoded == Ok "000001.png"