Normally I would use XInclude to include one XML file into another like this. This is my test include And this would be the XML file to be included: The XML File to be included
Now if I try to do this in my project I fail. I think the problem is the following. As I am using the MigraDocXML namespace I have to use the <Document></Document>
Tag as my root element. The Document element although has defined tags and only this tags are usable.
Does anybody know a workaround or a different approach? To make my goal clear: I want to include multiple XML files into my "Main" XML file.
I must admit I've not actually done anything with XInclude, so I'd need to do some experimenting to see if that can actually work with MigraDocXml in its current form or not.
Though if you take a look at the Resource & Insert elements, I think they might already cover what you're looking for.
The resource defines a template for part of the document, which then gets called from Inserts, and can then be used multiple times either within the same file, or across several files.
There's a lesson on how to use them here with a few examples: https://gitlab.com/jamescoyle/MigraDocXML/-/blob/master/Lessons/Lesson%205.0%20-%20Resources.pdf