Opened 16 years ago
Closed 16 years ago
#2322 closed defect (fixed)
GTiff GDALDriver.GetMetadata() returns malformed xml for DMD_CREATIONOPTIONLIST
Reported by: | lpinner | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.2 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | gtiff |
Cc: |
Description
GDAL version: GDAL 1.5.0, released 2007/12/18
The closing tag of the value elements is lowercase </value> and does not match the opening tag case </Value> for the following:
<Option name='PHOTOMETRIC' type='string-select'> ... <Value>MINISWHITE</value> .... </Option> <Option name='PROFILE' type='string-select' default='GDALGeoTIFF'> ... <Value>GeoTIFF</value> .... </Option> <Option name='PIXELTYPE' type='string-select'> ... <Value>SIGNEDBYTE</value> .... </Option>
Python example:
from osgeo import gdal from xml.dom.minidom import parseString driver=gdal.GetDriverByName('GTiff') metadata=driver.GetMetadata() optionsXML=metadata['DMD_CREATIONOPTIONLIST'] XMLdom=parseString(optionsXML) ... File "c:\python24\lib\xml\dom\minidom.py", line 1925, in parseString return expatbuilder.parseString(string) File "c:\python24\lib\xml\dom\expatbuilder.py", line 940, in parseString return builder.parseString(string) File "c:\python24\lib\xml\dom\expatbuilder.py", line 223, in parseString parser.Parse(string, True) ExpatError: mismatched tag: line 1, column 1168 #Workaround: XMLdom=parseString(optionsXML.replace('</value>','</Value>')) #Malformed XML
Change History (2)
comment:1 by , 16 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | gtiff added |
Milestone: | → 1.5.2 |
Status: | new → assigned |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Corrected in trunk (r14247), 1.5 branch (r14248) and 1.4 branch (r14249).