[BioPython] XML Parser problem

Steffi Gebauer-Jung gebauer-jung at ice.mpg.de
Mon Dec 11 15:54:54 UTC 2006


Hello,

there are more then 1 concatenated xml documents in the file - which in 
fact is no valid xml.

Some days ago I had the same problem.
It does not occur with the NCBI blast server but with our local blast 
server installation (version 2.2.15):
If there is more than only 1 query (regardless of given as sequences  or 
a multiple fasta file)
the resulting xml output is a concatenation of several xml files.

Interestingly for the command line blastall (version 2.2.15 too) the 
output is ok and
contains a valid xml document with several iterations.

Best, Steffi



>Message: 9
>Date: Mon, 11 Dec 2006 06:44:12 -0800 (PST)
>From: alper soyler <alpersoyler at yahoo.com>
>Subject: [BioPython] XML Parser problem
>To: biopython at lists.open-bio.org
>Message-ID: <20061211144412.6627.qmail at web56505.mail.re3.yahoo.com>
>Content-Type: text/plain; charset=ascii
>
>Dear all,
>
>I run blastall with option -m7 to save the resulting file as xml. However, when I open the xml file with firefox, it gave the following error message.
>
>XML Parsing Error: junk after document element
>Location: file:///home/alper/Desktop/genes/combinedblastfile.xml
>Line Number 38, Column 1:
><?xml version="1.0"?>
>^
>But it can be opened with the text editor. When I tried to parse the results with biopython it also gives the below errors. I did not understand the reason. If you help me, I will be very glad. Thank you in advance.
>  Traceback (most recent call last):
>  File "XMLBlastParser.py", line 13, in ?
>      b_record = b_parser.parse(blast_out)
>  File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIXML.py", line 112,          in parse
>        self._parser.parse(handler)
>  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line       109, in parse
>        xmlreader.IncrementalParser.parse(self, source)
>  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", line       123, in parse
>        self.feed(buffer)
>  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line       220, in feed
>        self._err_handler.fatalError(exc)
>  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/handler.py", line 38,       in fatalError
>        raise exception
>xml.sax._exceptions.SAXParseException:/home/alper/Desktop/genes/combinedblastfile.xml:38:0: junk after document element
>
>
>Alper Soyler
>Dept. of Food Engineering
>Middle East Technical University,Turkey
>Tel:+90312 2105625
>Fax:+90312 2102767
>http://www.metu.edu.tr/~soyler
>



More information about the Biopython mailing list