astropy/astropy — Issue #166: Parse non-compliant VOTable-1.1 files from Chandra footprint server?
Author: taldcroft
Created: 2012-02-11 21:12:33+00:00
State: open
Labels: Feature Request, io.vo

Someone on the CfA pythonusers list posted a question about parsing a VOTable-1.1 file that is delivered by the Chandra Data Archive footprint server. He used this script:

```python
import urllib2
from coatpy import Siap, Sesame
import vo
from vo import table as votable
url='http://cxc.harvard.edu/cgi-gen/cda/footprint/get_vo_table.pl?strict=1'
foot=Siap(url)
params={}
params['RA']=40.669
params['DEC']=-0.013
params['SIZE']=0.0
params['FORMAT']='image/fits'
hla = Siap(url)
f=open('testfoot.xml','wb')
f.write(hla.getRaw(**params))
f.close()
```

The file `testfoot.xml` is available at http://hea-www.harvard.edu/~aldcroft/tmp/testfoot.xml

This file does not comply with VOTable-1.1 and astropy.io.vo.table('testfoot.xml', pedantic=False) complains that a `PARAM` does not have the required `datatype` attribute. The same file is successfully parsed by topcat however.

The question here is whether the `pedantic=False` mode can be opened up to allow reading of this brand of non-compliant file.