Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative to XInclude

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..)

like image 930
LB40 Avatar asked Oct 18 '25 13:10

LB40


2 Answers

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.

like image 89
jhexp Avatar answered Oct 21 '25 03:10

jhexp


I don't use .net, but you can try using entities...

<!DOCTYPE example [
<!ENTITY doc1 SYSTEM "doc1.xml">
<!ENTITY doc2 SYSTEM "doc2.xml">
]>
<example>
&doc1;
&doc2;
</example>
like image 20
Daniel Haley Avatar answered Oct 21 '25 02:10

Daniel Haley