When using docinfo.internalDTD.iterentities() content is empty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Confirmed
|
Low
|
Unassigned |
Bug Description
I am trying to process a GDML file i.e. XML and access the !ENTITY definitions.
I can process the file by using resolve_
The start of the GDML file looks like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE gdml [
<!ENTITY materials SYSTEM "materialsOptic
<!ENTITY solids_Mainz_v2 SYSTEM "solids_
<!ENTITY matrices_Mainz_v2 SYSTEM "matrices_
]>
My attempt todate looks like
from lxml import etree
myparser = etree.XMLParser
tree = etree.parse(
print(
print(
print(
for e in tree.docinfo.
Which gets to print out the !ENTITY names materials, solids and matrices but I cannot see how to access their definition i.e. SYSTEM "materialsOptic
The print of iterentities has
materials
None
None
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_
Should the definitions not be available as content?
Thanks
python reportLXML.py
Python : sys.version_
lxml.etree : (4, 3, 3, 0)
libxml used : (2, 9, 9)
libxml compiled : (2, 9, 9)
libxslt used : (1, 1, 33)
libxslt compiled : (1, 1, 33)
Tried with lxml 4.4.0 but no change