I am using XML files as configuration files for my PowerShell scripts based on the blog post found at rkeithhill.wordpress.com. Some of my scripts shares the same settings and I would like to include those settings from an external XML file. What I have done is:
and the shared.xml file contains (one line only):
Using the following code snippet I load the XML and print it to the console:
The output is:
The way I load the XML does not include the content of shared.xml, but it does parse the DOCTYPE tag, since if I revert to an invalid file it will fail.
So, how could I get PowerShell to fully include the XML snippet, so that loadconfig will find the key and value for my backhoe as well?
I have also tried
but it won't load anything as long as I have the &shareddata; in the config file:
