Include one XML within another XML and parse it with python
问题 I wanted to include an XML file in another XML file and parse it with python. I am trying to achieve it through Xinclude. There is a file1.xml which looks like <?xml version="1.0"?> <root> <document xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="file2.xml" parse="xml" /> </document> <test>some text</test> </root> and file2.xml which looks like <para>This is a paragraph.</para> Now in my python code i tried to access it like: from xml.etree import ElementTree, ElementInclude