XML::Mini::Element

XML::Mini::Element is a Perl implementation of the XML::Mini Element API.
Download

XML::Mini::Element Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Patrick Deegan
  • Publisher web site:
  • http://search.cpan.org/~pdeegan/XML-Mini-1.2.8/lib/XML/Mini/Node.pm

XML::Mini::Element Tags


XML::Mini::Element Description

XML::Mini::Element is a Perl implementation of the XML::Mini Element API. XML::Mini::Element is a Perl implementation of the XML::Mini Element API.SYNOPSIS use XML::Mini::Document; my $xmlDoc = XML::Mini::Document->new(); # Fetch the ROOT element for the document # (an instance of XML::Mini::Element) my $xmlElement = $xmlDoc->getRoot(); # Create an tag my $xmlHeader = $xmlElement->header('xml'); # add the version to get $xmlHeader->attribute('version', '1.0'); # Create a sub element my $newChild = $xmlElement->createChild('mychild'); $newChild->text('hello mommy'); # Create an orphan element my $orphan = $xmlDoc->createElement('annie'); $orphan->attribute('hair', '#ff0000'); $orphan->text('tomorrow, tomorrow'); # Adopt the orphan $newChild->appendChild($orphan); # ... # add a child element to the front of the list $xmlElement->prependChild($otherElement); print $xmlDoc->toString();The code above would output:< ?xml version="1.0" ? > < mychild > hello mommy < annie hair="#ff0000" > tomorrow, tomorrow < /annie > < /mychild > Requirements: · Perl


XML::Mini::Element Related Software