GBrowse
view release on metacpan or search on metacpan
conf/MobyServices/text_xml_renderer.pm view on Meta::CPAN
our @EXPORT_OK = qw(render type);
sub types {
return ["text-xml"];
}
sub render {
my ($DOM, $htmldir,$imgdir) = @_;
my $content;
$content = &getStringContent($DOM);
$content =~ s/<!\[cdata\[/<[CDATA[/ig;
$content =~ s/<([^>]+)>/<$1>/g; # mask '>' and '<' in tags
return ("<pre>$content</pre>");# the 0 indicates that we have only rendered the top-level XML of this object
}
sub getStringContent {
my ($ROOT) = @_;
my $content;
my @childnodes = $ROOT->childNodes;
foreach (@childnodes){
next unless ($_->nodeType == ELEMENT_NODE);
next unless ($_->localname eq "String");
( run in 0.279 second using v1.01-cache-2.11-cpan-454fe037f31 )