Opened 16 years ago

Last modified 16 years ago

#234 closed defect (fixed)

[MiniXML] Error with <!DOCTYPE...> tags

Reported by: Daniel Morissette Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc: lacroix@…


Documents with <!DOCTYPE...> tags produce an error with MiniXML.  Not sure if 
the lib should try to make sense of those tags, but it should at least ignore 

Note that those tags can contain other tags inside a [...] block, so it's not 
just a matter of looking for the next '>' to skip a single tag.  See the OGC WMS 
spec documents for examples.

Change History (1)

comment:1 Changed 16 years ago by warmerdam

I have added a new CXT_Literal node type to cpl_minixml. Currently only 
<!DOCTYPE ...> is collected as a literal node, but in the future we could 
suck basically any special XML/SGML junk that doesn't fit the normal hierarchical
model into this kind of the node.  The literal node isn't processed at all, and
when deserializing is just emitted as is (on it's own line with indentation). 

The gdal/port/xmlformat program now works like this:

warmerda@gdal[284]% cat test.xml
<abc><def attr="123" /></abc>
warmerda@gdal[285]% xmlreformat test.xml
  <def attr="123"/>

Note: See TracTickets for help on using tickets.