ChEBI icon indicating copy to clipboard operation
ChEBI copied to clipboard

Malformed XML format in CHEBI:16551

Open mmokrejs opened this issue 2 years ago • 1 comments

Hi, it seems ChEBI writes broken XML files with sharp brackets unescaped (actually should be < and > , respectively), breaking the XML syntax:

Debug: File CHEBI:16551.xml
Traceback (most recent call last):
  File "blah.py", line 252, in parse_chebi_xml
    etree=ET.parse(filename)
  File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 1229, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 580, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 23, column 25

See the line 23 in the CHEBI:16551 entry.

With best regards, Martin

mmokrejs avatar Dec 14 '21 19:12 mmokrejs