XML::Parser::Wrapper

XML::Parser::Wrapper is a Perl module for parsing XML.
Download

XML::Parser::Wrapper Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Don Owens
  • Publisher web site:
  • http://search.cpan.org/~dowens/

XML::Parser::Wrapper Tags


XML::Parser::Wrapper Description

XML::Parser::Wrapper is a Perl module for parsing XML. XML::Parser::Wrapper is a Perl module for parsing XML. XML::Parser::Wrapper is a wrapper on top of XML::Parser that provides a more friendly API.SYNOPSIS use XML::Parser::Wrapper; my $xml = qq{Hello World!}; my $root = XML::Parser::Wrapper->new($xml); my $root2 = XML::Parser::Wrapper->new({ file => '/tmp/test.xml' }); my $root_tag_name = $root->name; my $roots_children = $root->elements; foreach my $element (@$roots_children) { if ($element->name eq 'head') { my $id = $element->attr('id'); my $hello_world_text = $element->text; # eq "Hello World!" } } my $head_element = $root->element('head2'); my $head_elements = $root->elements('head2'); my $test = $root->element('head2')->element('test_tag'); my $new_element = $root->add_child('test4', { attr1 => 'val1' }); my $kid = $root->update_kid('root_child', { attr2 => 'stuff2' }, 'blah'); $kid->update_node({ new_attr => 'new_stuff' }); $new_element->add_child('child', { myattr => 'stuff' }, 'bleh'); my $new_xml = $root->to_xml; Requirements: · Perl


XML::Parser::Wrapper Related Software