I've some processing instructions like the one below at the top of my XML file:
<?ID Object="AUTO_REPORT_OBJECT" Version="1.0"?>
I would like to read Object and Version attributes value using Go libraries. I'm using Go 1.19.
My XML file is like this:
<?xml version="1.0" encoding="UTF-8"?>
<?ID Object="AUTO_REPORT_OBJECT" Version="1.0"?>
<?xml-stylesheet type="text/xsl" href="../XML/ProdRep.xsl"?>
<!DOCTYPE Auto_Report SYSTEM "../XML/ProdRep.dtd" [
<!ELEMENT Auto_Report (Production_Report+)>
]>
<Auto_Report>
<Production_Report Type="AUTO">
... more tags
</Production_Report>
</Auto_Report>
<?End?>
I don't know
Go
, but you can parse this with python 3.11.