Any::Renderer::XML

Any::Renderer::XML Perl module can render a data structure as element-only XML.
Download

Any::Renderer::XML Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Matt Wilson
  • Publisher web site:
  • http://search.cpan.org/~mwilson/

Any::Renderer::XML Tags


Any::Renderer::XML Description

Any::Renderer::XML Perl module can render a data structure as element-only XML. Any::Renderer::XML Perl module can render a data structure as element-only XML.SYNOPSIS use Any::Renderer; my %xml_options = (); my %options = ( 'XmlOptions' => %xml_options ); my $format = "XML"; my $r = new Any::Renderer ( $format, %options ); my $data_structure = ; # arbitrary structure code my $string = $r->render ( $data_structure );You can get a list of all formats that this module handles using the following syntax: my $list_ref = Any::Renderer::XML::available_formats ();Also, determine whether or not a format requires a template with requires_template: my $bool = Any::Renderer::XML::requires_template ( $format );Any::Renderer::XML renders any Perl data structure passed to it as element-only XML. For example: perl -MAny::Renderer -e "print Any::Renderer->new('XML')->render({a => 1, b => })"results in: < ?xml version="1.0" encoding="ISO-8859-1" standalone="yes"? > < output > < a >1< /a > < b >2< /b > < b >3< /b > < /output >The rendering process comes with all the caveats cited in the XML::Simple documentation. For example if your data structure contains binary data or ASCII control characters, then the XML document that is generated may not be well-formed. Requirements: · Perl


Any::Renderer::XML Related Software