XML::Compile::Schema

XML::Compile::Schema is a Perl module to compile a schema.
Download

XML::Compile::Schema Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Mark Overmeer
  • Publisher web site:
  • http://search.cpan.org/~markov/

XML::Compile::Schema Tags


XML::Compile::Schema Description

XML::Compile::Schema is a Perl module to compile a schema. XML::Compile::Schema is a Perl module to compile a schema.INHERITANCE XML::Compile::Schema is a XML::CompileSYNOPSIS # preparation my $parser = XML::LibXML->new; my $tree = $parser->parse...(...); my $schema = XML::Compile::Schema->new($tree); my $schema = XML::Compile::Schema->new($xml_string); my $read = $schema->compile(READER => 'mytype'); my $hash = $read->($xml); my $doc = XML::LibXML::Document->new('1.0', 'UTF-8'); my $write = $schema->compile(WRITER => 'mytype'); my $xml = $write->($doc, $hash); print $xml->toString;This module collects knowledge about a schema. The most important method is compile() which can create XML file readers and writers based on the schema information and some selected type.WARNING: The compiler is implemented in XML::Compile::Schema::Translate, which is NOT FINISHED. See that manual page about the specific behavior and its (current) limitations! Please help to find missing pieces and mistakes.WARNING: the provided schema is not validated! In some cases, compile-time and run-time errors will be reported, but typically only in cases that the parser has no idea what to do with such a mistake. On the other hand, the processed data is validated: the output should follow the specs closely.Two implementations use the translator, and more can be added later. Both get created with the compile() method.XML ReaderThe XML reader produces a hash from a XML::LibXML::Node tree, or an XML string. The values are checked and will be ignored if the value is not according to the specs.XML WriterThe writer produces schema compliant XML, based on a hash. To get the data encoding correct, you are required to pass a document in which the XML nodes may get a place later. Requirements: · Perl


XML::Compile::Schema Related Software