[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Jul 1 15:32:02 UTC 2003


mwilkinson
Tue Jul  1 11:32:02 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory pub.open-bio.org:/tmp/cvs-serv18420/MOBY/Client

Modified Files:
	Central.pm CollectionArticle.pm 
Log Message:
fixed XML parsing of simple articles

moby-live/Perl/MOBY/Client Central.pm,1.39,1.40 CollectionArticle.pm,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm	2003/07/01 15:00:47	1.39
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm	2003/07/01 15:32:02	1.40
@@ -1305,6 +1305,7 @@
 				my $current = $xPuts->item($in);
 				
 				foreach my $child($current->getChildNodes){  # child nodes will be either "Simple" or "Complex" tagnames
+					next unless $child->getNodeType == ELEMENT_NODE;
 					my $THIS;
 					if ($child->getTagName eq "Simple"){
 						$THIS = MOBY::Client::SimpleArticle->new(XML_DOM => $child);

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/CollectionArticle.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY/Client/CollectionArticle.pm	2003/07/01 15:00:47	1.1
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/CollectionArticle.pm	2003/07/01 15:32:02	1.2
@@ -192,6 +192,7 @@
     $self->articleName($articleName);
     my $objects = $dom->getElementsByTagName("Simple");
     foreach my $child($objects->item(0)->getChildNodes){  # there must be only one in a simple!  so take element 0
+        next unless $child->getNodeType == ELEMENT_NODE;
         $self->addSimple(MOBY::Client::SimpleArticle->new(XML_DOM => $child));
     }
     return $self;




More information about the MOBY-guts mailing list