Hi TheXman,
I'm having a strange issue while using "_XML_CreateDOMDocument","_XML_Load" "_XML_SaveToFile" .
While opening Windows SIM "unattend.xml" files using your "XML.au3" UDF (By the way great work by picking up "eltorro" code and adding extra features)
I'm having some issues:
Using "_XML_CreateDOMDocument" and setting up as "Default" (in my case it ends up being "6") I get the following output (upon Load and SaveToFile😞
<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend">
Thus missing a "CRLF" at the first entry.
I have to change the parameter to "3" to get the proper result (equal to the original file):
Like this:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
I Just wanted to know if this is normal and related to "__XML_MiscProperty_DomVersion" function, or not.
Because I can keep the "3" to produce the same result. And in fact this is only a glitch (they are both valid to the best of my knowledge) .
Nonetheless I do have another more serious issue. Apparently Microsoft is creating special XML's when using WSIM for "SynchronousCommand wcm:action" :
For their own parsing code they require the both " and ' to be represented by " and ' , just to differentiate from their own XML code.
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>Never Expires</Description>
<CommandLine>cmd /C WMIC USERACCOUNT WHERE "Name='TESTUSER'" SET PasswordExpires=FALSE</CommandLine>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
Unfortunately while using the functions "_XML_Load" and then "_XML_SaveToFile" all data containing (["] and [']) get back to (" and '), resulting in:
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>Never Expires</Description>
<CommandLine>cmd /C WMIC USERACCOUNT WHERE "Name='TESTUSER'" SET PasswordExpires=FALSE</CommandLine>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
I know this is "kind" of normal, but is there any way to avoid this? I mean keeping the original Raw data?
Thanks in advance,
Regards.