GDML giles with comments after the closing GDML tag, </gdml>
, produce an error when being loaded:
$ root
root [0] TGeoManager::Import("root-test.gdml")
Info in <TGeoManager::Import>: Reading geometry from file: root-test.gdml
Info in <TGeoManager::TGeoManager>: Geometry GDMLImport, Geometry imported from GDML created
Error in <TXMLEngine::ParseFile>: Unexpected end of xml file
Error in <TGeoManager::Import>: Cannot open file
(TGeoManager *) 0x7ff2fb337400
The GDML file with a comment at the end:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE gdml [
<!ENTITY common_materials SYSTEM "../common/common-materials.xml">
<!ENTITY common_defines SYSTEM "../common/common-defines.xml">
]>
<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schema/gdml.xsd">
<define>
</define>
<materials>
</materials>
<solids>
<tube name="solid" rmin="1" rmax="4" z="20" deltaphi="360." aunit="deg" />
</solids>
<structure>
<volume name="My_Vol">
<solidref ref="solid"/>
</volume>
</structure>
<setup name="Default" version="1.0"> <world ref="My_Vol"/></setup>
</gdml>
<!-- A comment which causes an error. -->