[Fwd: Re: [BioPython] BLAST XML problem?]

Tim Harder tharder at burnham.org
Wed Jan 11 15:07:30 EST 2006


|XMLDecl| ::= |'<?xml' VersionInfo EncodingDecl ? SDDecl ? S ? '?>'

(source http://www.w3.org/TR/2004/REC-xml-20040204/#NT-XMLDecl)

As far as I understand that definition, the encoding attribute is 
optional, so the NCBI File should be ok from the XML point of view.
Anyway, how can I tell SAX which encoding table to use, beside editing 
the XML file itself?

Tim


Sebastian Bassi wrote:

>On 1/11/06, Peter <biopython at maubp.freeserve.co.uk> wrote:
>  
>
>><?xml version="1.0" encoding="ISO-8859-1"?>
>>Instead its just:
>><?xml version="1.0"?>
>>Short term solutions which I have just tried and got to work:
>>(1) Edit the offending character by hand (as you did)
>>(2) Specify encoding="ISO-8859-1" by editing the first line by hand
>>(2) Covert the file to unicode (doubles the size)
>>    
>>
>
>I have a 4th solution, that doesn't involve XML editing, so it will
>"fix" the problem for other users:
>4) Change Biopython or XML parser to assume encoding = ISO-8859-1 when
>there is no encoding information.
>I wonder if <?xml version="1.0"?> is a W3C valid first line for a XML
>file. If this is OK (from the point of view of the XML standard), then
>the parser should be corrected, if not, according to the standard, the
>file should be rejected for non compliance (this is not HTML where the
>browser client can accept and correct invalid code, the specifications
>states that XML should validate before being used).
>
>--
><a href="http://www.spreadfirefox.com/?q=affiliates&id=24672&t=1">La
>web sin popups ni spyware: Usa Firefox en lugar de Internet
>Explorer</a>
>
>_______________________________________________
>BioPython mailing list  -  BioPython at biopython.org
>http://biopython.org/mailman/listinfo/biopython
>
>
>  
>




More information about the BioPython mailing list