polps Posted January 21, 2020 Posted January 21, 2020 Hi all, I'm writing a new script for reading/writing xml file. first question: I found different example and I see different ways: ObjCreate("Msxml2.DOMDocument") and ObjCreate("Microsoft.XMLDOM") ? which is the best? second question: $oNodeFile = $oXmlLog.createElement("File") $oNodeRoot.appendChild($oNodeFile) this is working but the output is written in one line (I'm using notepad++) <ROOT><NODE><SUBNODE/></NODE></ROOT> instead of <ROOT> <NODE> <SUBNODE/> </NODE> </ROOT> how can I format the xml in order to see the node indent? Thanks in advance
Subz Posted January 21, 2020 Posted January 21, 2020 Both Microsoft.XMLDOM and Msxml2.DOMDocument will use the default xml parser on your system, so effectively the same. Use the xml udf by mLipok and more specifically _XML_Tidy to create the indents.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now