As far as I know there is no support for XInclude
in .net.
I'd like to leverage the same kind of mechanism for hierarchically organized XML configuration files. I mean I have a top-level XML config file referencing specific Xml files. My configuration is a cluster of configurations dedicated to one particular module.
How should I do it ? (Or maybe why I shouldn't do it..)
MS has created a library for that.
check out http://www.microsoft.com/en-us/download/details.aspx?id=4972
should help
there are 3ed party solutions.
you can extend a XmlReader to read XInclude
I don't use .net, but you can try using entities...
You can use my Linq to XML XInclude extention method:
The code was inspired by following blog post: http://catarsa.com/Articles/Blog/Any/Any/Linq-To-Xml-XInclude?MP=pv
Further XInclude infos: http://msdn.microsoft.com/en-us/library/aa302291.aspx
First of all, there is some 3rd party support for XInclude in .NET XInclude.NET on Codeplex.
If you are asking because of the configuration files, they have some sort of the same functionality build-in with configSource attribute, see this article describing it.