BodaTodoTotre
New Member
I'm using lxml to parse a file that contains xi:include elements, and I'm resolve the includes using xinclude().Given an element, is there any way to identify the file and source line that the element originally appeared in?For example:\[code\]from lxml import etreedoc = etree.parse('file.xml')doc.xinclude()xpath_expression = ...elt = doc.xpath(xpath_expression)# Print file name and source line of `elt` location\[/code\]