Jump to content

Recommended Posts

Posted

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

 

 

 

 

 

 

 

 

Posted

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.

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...