XML::Maker

XML::Maker is OO module for generating XML.
Download

XML::Maker Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Vadim Trochinsky
  • Publisher web site:
  • http://search.cpan.org/~vadimt/XML-Maker-0.01/Maker.pm

XML::Maker Tags


XML::Maker Description

XML::Maker is OO module for generating XML. XML::Maker is OO module for generating XML.SYNOPSIS #/usr/bin/perl -w use XML::Maker; my $root = new XML::Maker("root"); my $person = $root->subtag("person", name => 'Vadim', age => 22); my $info = $person->subtag("info"); $info->text("Perl programmer"); print $root->make(0);Here are some key features of "XML Maker":· Easy and compact generation of XML· A function receiving an object can't change the parent.· It's impossible to make more than one root element· It's impossible to leave an element unclosed· Can print indented XMLThis module has been written to provide easy and safe generation of XML. Unlike other modules, this one does not produce output as soon as it can, but only when calling the make() function. This is intentionally done to make sure that it will always output well formatted XML.One disadvantage of using this module is that everything is kept in memory until you destroy the object. If your program needs to generate a large amount of XML you should use another module, for example see XML::Writer.Another intended feature is safety. If you pass a XML::Maker object to a function it will be able to do whatever it wants with it, but will not have access to its parent. This should make it easier to find which part of the program is generating bad output, but again, may not suit your needs.For ease of use, XML closing tags are generated automatically. If the resulting XML element contains a CDATA area, then the output will contain opening and closing tags: < element key="value" >text< /element >However, if there is no text, then an empty tag will be generated: < element key="value"/ >Due to the design of this module, child objects will not go out of scope as you might expect, see "remove()" for an explanation of this.Requirements:· Perl


XML::Maker Related Software