[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Fri Mar 11 22:22:58 UTC 2005
mwilkinson
Fri Mar 11 17:22:57 EST 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv13705
Modified Files:
CommonSubs.pm
Log Message:
getNodeContentWithArticle now recognizes CDATA content as well
moby-live/Perl/MOBY CommonSubs.pm,1.60,1.61
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2005/03/08 04:44:12 1.60
+++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2005/03/11 22:22:57 1.61
@@ -1279,7 +1279,7 @@
for ( 1 .. $valuenodes->size() ) {
my $valuenode = $valuenodes->get_node( $_ );
foreach my $amount ( $valuenode->childNodes ) {
- next unless $amount->nodeType == TEXT_NODE;
+ next unless ($amount->nodeType == TEXT_NODE || $amount->nodeType == CDATA_SECTION_NODE);
$resp .= $amount->nodeValue;
}
}
@@ -1287,7 +1287,7 @@
} else {
my $resp;
foreach ( $child->childNodes ) {
- next unless $_->nodeType == TEXT_NODE;
+ next unless ($_->nodeType == TEXT_NODE || $amount->nodeType == CDATA_SECTION_NODE);
$resp .= $_->nodeValue;
}
push @contents, $resp;
More information about the MOBY-guts
mailing list