-
XML-TreePP:XML下载
资源介绍
名称
XML::TreePP -- 用于解析/编写 XML 文档的纯 Perl 实现
概要
将 XML 文档从文件解析为哈希树:
use XML::TreePP;
my $tpp = XML::TreePP->new();
my $tree = $tpp->parsefile( "index.rdf" );
print "Title: ", $tree->{"rdf:RDF"}->{item}->[0]->{title}, "\n";
print "URL: ", $tree->{"rdf:RDF"}->{item}->[0]->{link}, "\n";
将 XML 文档作为哈希树中的字符串写入:
use XML::TreePP;
my $tpp = XML::TreePP->new();
my $tree = { rss => { channel => { item =>