Open stf1981 opened 3 years ago
I ran into the same issue.
Apparently, if the root element is not empty, it the code in win_xml.ps1 can access it using $xmlOrig.$localname (with $localname being the local name of the root element).
Maybe changing the code to directly access $xmlOrig.DocumentElement might achieve the same thing, but also when the root element is empty. (I lack the insight as to for what reasons the access is implemented the way it is.)
SUMMARY
I try to add a element under the root element, than it comes to a exception. See Below. When i run the same code piece from the ps1 module directly on the remote machine, than the "SchemaInfo" property is available. I don´t know what is going on.
ISSUE TYPE
COMPONENT NAME
win_xml
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Target OS: Windows 10 Community.Windows: 1.3.0
STEPS TO REPRODUCE
I have the following XML
Tan i try to add one element under the root element with
EXPECTED RESULTS
The "Host" element ist added under the "IndexServerList" root element.
ACTUAL RESULTS