Was just trying to hand-job a convert of one of my scripts, from using INI files to XML files ... not using the UDF's we developed right now, will be - but not right now ... basically I am saving the properties of an object.
Based on my read so far, this is how one would go about doing this (the object in this case is a GridView) ...
Code:
$xml = CreateObject("Microsoft.XMLDOM")
If Not $xml
Return
Endif
$grid = $xml.AppendChild($xml.CreateElement("grid"))
$grid.AppendChild($xml.CreateElement("AllowSorting")).Text = $GridView.AllowSorting
$grid.AppendChild($xml.CreateElement("RowCount")).Text = $GridView.RowCount
$grid.AppendChild($xml.CreateElement("ColumnCount")).Text = $GridView.ColumnCount
$= $xml.Save($SaveFileDialog.Filename)
Return
Its this stuff here I am scratching my head over:
$grid.AppendChild($xml.CreateElement("RowCount")).Text = $GridView.RowCount
Does one really need to create an element at the document level ($xml), then explicitly APPEND it to a child node, is this really the proper way of building the XML file, or am I missing a more simpler way.
-Shawn