XML::Mini::Document 1.2.8
Sponsored Links
XML::Mini::Document 1.2.8 Ranking & Summary
File size:
0.034 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1136
Date added:
2006-09-14
Publisher:
Patrick Deegan, Psychogenic Inc.
XML::Mini::Document 1.2.8 description
XML::Mini::Document is a Perl implementation of the XML::Mini Document API.
SYNOPSIS
use XML::Mini::Document;
use Data::Dumper;
###### PARSING XML #######
# create a new object
my $xmlDoc = XML::Mini::Document->new();
# init the doc from an XML string
$xmlDoc->parse($XMLString);
# You may use the toHash() method to automatically
# convert the XML into a hash reference
my $xmlHash = $xmlDoc->toHash();
print Dumper($xmlHash);
# You can also manipulate the elements like directly, like this:
# Fetch the ROOT element for the document
# (an instance of XML::Mini::Element)
my $xmlRoot = $xmlDoc->getRoot();
# play with the element and its children
# ...
my $topLevelChildren = $xmlRoot->getAllChildren();
foreach my $childElement (@{$topLevelChildren})
{
# ...
}
###### CREATING XML #######
# Create a new document from scratch
my $newDoc = XML::Mini::Document->new();
# This can be done easily by using a hash:
my $h = {
spy => {
id => 007,
type => SuperSpy,
name => James Bond,
email => mi5@london.uk,
address => Wherever he is needed most,
},
};
$newDoc->fromHash($h);
# Or new XML can also be created by manipulating
#elements directly:
my $newDocRoot = $newDoc->getRoot();
# create the < ? xml ? > header
my $xmlHeader = $newDocRoot->header(xml);
# add the version
$xmlHeader->attribute(version, 1.0);
my $person = $newDocRoot->createChild(person);
my $name = $person->createChild(name);
$name->createChild(first)->text(John);
$name->createChild(last)->text(Doe);
my $eyes = $person->createChild(eyes);
$eyes->attribute(color, blue);
$eyes->attribute(number, 2);
# output the document
print $newDoc->toString();
This example would output :
< ?xml version="1.0"?>
< person>
< name>
< first>
John
< /first>
< last>
Doe
< /last>
< /name>
< eyes color="blue" number="2" />
< /person>
The XML::Mini::Document class is the programmers handle to XML::Mini functionality.
A XML::Mini::Document instance is created in every program that uses XML::Mini. With the XML::Mini::Document object, you can access the root XML::Mini::Element, find/fetch/create elements and read in or output XML strings.
SYNOPSIS
use XML::Mini::Document;
use Data::Dumper;
###### PARSING XML #######
# create a new object
my $xmlDoc = XML::Mini::Document->new();
# init the doc from an XML string
$xmlDoc->parse($XMLString);
# You may use the toHash() method to automatically
# convert the XML into a hash reference
my $xmlHash = $xmlDoc->toHash();
print Dumper($xmlHash);
# You can also manipulate the elements like directly, like this:
# Fetch the ROOT element for the document
# (an instance of XML::Mini::Element)
my $xmlRoot = $xmlDoc->getRoot();
# play with the element and its children
# ...
my $topLevelChildren = $xmlRoot->getAllChildren();
foreach my $childElement (@{$topLevelChildren})
{
# ...
}
###### CREATING XML #######
# Create a new document from scratch
my $newDoc = XML::Mini::Document->new();
# This can be done easily by using a hash:
my $h = {
spy => {
id => 007,
type => SuperSpy,
name => James Bond,
email => mi5@london.uk,
address => Wherever he is needed most,
},
};
$newDoc->fromHash($h);
# Or new XML can also be created by manipulating
#elements directly:
my $newDocRoot = $newDoc->getRoot();
# create the < ? xml ? > header
my $xmlHeader = $newDocRoot->header(xml);
# add the version
$xmlHeader->attribute(version, 1.0);
my $person = $newDocRoot->createChild(person);
my $name = $person->createChild(name);
$name->createChild(first)->text(John);
$name->createChild(last)->text(Doe);
my $eyes = $person->createChild(eyes);
$eyes->attribute(color, blue);
$eyes->attribute(number, 2);
# output the document
print $newDoc->toString();
This example would output :
< ?xml version="1.0"?>
< person>
< name>
< first>
John
< /first>
< last>
Doe
< /last>
< /name>
< eyes color="blue" number="2" />
< /person>
The XML::Mini::Document class is the programmers handle to XML::Mini functionality.
A XML::Mini::Document instance is created in every program that uses XML::Mini. With the XML::Mini::Document object, you can access the root XML::Mini::Element, find/fetch/create elements and read in or output XML strings.
XML::Mini::Document 1.2.8 Screenshot
XML::Mini::Document 1.2.8 Keywords
XML
Mini Document API
Document 1.2.8
API
Perl Implementation
document
createChild
new
Perl
implementation
1.2.8
XML::Mini::Document
XMLMiniDocument
XML::Mini::Document 1.2.8
Libraries
Programming
Bookmark XML::Mini::Document 1.2.8
XML::Mini::Document 1.2.8 Copyright
WareSeeker periodically updates pricing and software information of XML::Mini::Document 1.2.8 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of XML::Mini::Document 1.2.8 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
document shredding
crc16 perl implementation
documentary james brown muhammad ali
document object model
documents
document management software
my documents
documentales
business documents
document imaging
documents and settings
documentum
legal documents
documention
documentaries
documentary bbc
documentation
documentary
Related Software
XML::Mini::Element is a Perl implementation of the XML::Mini Element API. Free Download
XML::Mini is a Perl implementation of the XML::Mini XML create/parse interface. Free Download
XML::Mini::TreeComponent is a Perl implementation of the XML::Mini TreeComponent API. Free Download
XML::Mini::Element::Comment is used internally to represent . Free Download
XML::Mini::Element::CData Perl module is used internally to represent < ![CDATA [ CONTENTS ]] >. Free Download
XML::Mini::Node contains nodes that are used as atomic containers for numerical and text data and act as leaves in the XML tree. Free Download
XML::Mini::Element::Entity Perl module is used internally to represent < !ENTITY name "stuff" >. Free Download
XML::Mini::Element::Header Perl module is used internally to represent < ? xml blah="hohoho" ? > type headers. Free Download
Latest Software
Popular Software
Favourite Software