LibreCat / Catmandu-XML

Catmandu modules for working with XML data
https://metacpan.org/module/Catmandu::XML
Other
4 stars 3 forks source link

XML::Compile support? #18

Closed phochste closed 6 years ago

phochste commented 8 years ago

Have you ever considered using XML::Compile? With the XML::Struct you get a Perl hash, but you don't know which fields will be arrays or not. The parsing is based on the structure of the record at hand, not the XML schema. With XML::Compile you can get a Perl hash that has the same structure for every schema. It can even generate a template record that contains an example how your hash should look like to be able to generate (or parse) any XML record of a schema.

http://blogs.perl.org/users/brian_e_lozier/2011/10/using-xmlcompile-to-output-xsd-compliant-xml.html

I use it for Lido::XML

phochste commented 6 years ago

See Catmandu::XSD for XML::Compile support