Main > Programming > Libraries >

XML::DOM::Lite 0.10

XML::DOM::Lite 0.10

Sponsored Links

XML::DOM::Lite 0.10 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.030 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1205
Date added: 2006-07-14
Publisher: Richard Hundt

XML::DOM::Lite 0.10 description

XML::DOM::Lite is a Lite Pure Perl XML DOM Parser Kit.

SYNOPSIS

# Parser
use XML::DOM::Lite qw(Parser :constants);

$parser = Parser->new( %options );
$doc = Parser->parse($xmlstr);
$doc = Parser->parseFile(/path/to/file.xml);

# strip whitespace (can be about 30% faster)
$doc = Parser->parse($xml, whitespace => strip);


# All Nodes
$copy = $node->cloneNode($deep);
$nodeType = $node->nodeType;
$parent = $node->parentNode;
$name = $node->nodeName;
$xmlstr = $node->xml;
$owner = $node->ownerDocument;

# Element Nodes
$first = $node->firstChild;
$last = $node->lastChild;
$tag = $node->tagName;
$prev = $node->nextSibling;
$next = $node->previousSibling;

$node->setAttribute("foo", $bar);
$foo = $node->getAttribute("foo");
foreach my $attr (@{$node->attributes}) { # attributes as nodelist
# ... do stuff
}
$node->attributes->{foo} = "bar"; # or as hashref (overload)

$liveNodeList = $node->getElementsByTagName("child"); # deep

$node->insertBefore($newchild, $refchild);
$node->replaceChild($newchild, $refchild);


# Text Nodes
$nodeValue = $node->nodeValue;
$node->nodeValue("new text value");

# Processing Instruction Nodes
# CDATA Nodes
# Comments
$data = $node->nodeValue;

# NodeList
$item = $nodeList->item(42);
$index = $nodeList->nodeIndex($node);
$nlist->insertNode($newNode, $index);
$removed = $nlist->removeNode($node);
$length = $nlist->length; # OR scalar(@$nodeList)


# NodeIterator and NodeFilter
use XML::DOM::Lite qw(NodeIterator :constants);

$niter = NodeIterator->new($rootnode, SHOW_ELEMENT, {
acceptNode => sub {
my $n = shift;
if ($n->tagName eq wantme) {
return FILTER_ACCEPT;
} elsif ($n->tagName eq skipme) {
return FILTER_SKIP;
} else {
return FILTER_REJECT;
}
}
);
while (my $n = $niter->nextNode) {
# do stuff
}

# XSLT
use XML::DOM::Lite qw(Parser XSLT);
$parser = Parser->new( whitespace => strip );
$xsldoc = $parser->parse($xsl);
$xmldoc = $parser->parse($xml);
$output = XSLT->process($xmldoc, $xsldoc);


# XPath
use XML::DOM::Lite qw(XPath);
$result = XPath->evaluate(/path/to/*[@attr="value"], $contextNode);


# Document
$rootnode = $doc->documentElement;
$nodeWithId = $doc->getElementById("my_node_id");
$textnode = $doc->createTextNode("some text string");
$element = $doc->createElement("myTagName");
$docfrag = $doc->createDocumentFragment();
$xmlstr = $doc->xml;
$nlist = $doc->selectNodes(/xpath/expression);
$node = $doc->selectSingleNode(/xpath/expression);


# Serializer
use XML::DOM::Lite qw(Serializer);

$serializer = Serializer->new;
$xmlout = $serializer->serializeToString($node);

XML::DOM::Lite 0.10 Screenshot

Advertisements

XML::DOM::Lite 0.10 Keywords

Bookmark XML::DOM::Lite 0.10

Hyperlink code:
Link for forum:

XML::DOM::Lite 0.10 Copyright

WareSeeker periodically updates pricing and software information of XML::DOM::Lite 0.10 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::DOM::Lite 0.10 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
XML::DOM::Lite::XSLT is Perl module XSLT engine for XML::DOM::Lite. Free Download
Document is a XML DOM Lite Document. Free Download
XML::DOM::Lite::XPath is a Perl module for XPath support for XML::DOM::Lite. Free Download
XML::DOM2 is a DOM controlled, strict XML module for extentable xml objects. Free Download
XML::DOM::XML_Base Perl module can apply xml:base to attribute values. Free Download
XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module. Free Download
XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module. Free Download
XML::DOM::Text is a piece of XML text in XML::DOM. Free Download