Is there an "include" directive in XML?
-
I want to be able to concatenate several XML files together, and I can't find anything on W3C.org that says xml has an "include" tag. Does it? Am I blind? Or am I screwed? Conversely, the reason I need this is because the stupid XmlDataDocument.Load method can't be called more than once. It requires a blank document, and there is no Append or similar function. X| Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka
Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files" -
I want to be able to concatenate several XML files together, and I can't find anything on W3C.org that says xml has an "include" tag. Does it? Am I blind? Or am I screwed? Conversely, the reason I need this is because the stupid XmlDataDocument.Load method can't be called more than once. It requires a blank document, and there is no Append or similar function. X| Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka
Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files" -
I want to be able to concatenate several XML files together, and I can't find anything on W3C.org that says xml has an "include" tag. Does it? Am I blind? Or am I screwed? Conversely, the reason I need this is because the stupid XmlDataDocument.Load method can't be called more than once. It requires a blank document, and there is no Append or similar function. X| Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka
Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"Have a look at the
ImportNode
andAppendChild
methods. Something like this should work:XmlDataDocument doc1 = LoadDoc1();
XmlDataDocument doc2 = LoadDoc2();
foreach(XmlNode source in doc2.DocumentElement.ChildNodes)
doc1.DocumentElement.AppendChild(doc1.ImportNode(source, true));
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer