I'm trying to use
Node.childNodes (as opposed to enumerating
Node.selectNodes(), so that I can access comments in interfaces, as well as windows, controls and elements.
...except that I don't know how to loop through one.
js code:
XMLO = new ActiveXObject("Microsoft.XMLDom"); // defined globally
if (XMLO.load(MsgPlus.ScriptFilesPath + "\\File.xml")) // load a file
{
var WindowEnum = new Enumerator(XMLO.selectNodes("//Interfaces/Window"));
for (; !WindowEnum.atEnd(); WindowEnum.moveNext()) // loop through each window in the file
{
var WindowId = WindowNode.getAttribute("Id");
var WindowXMLPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/";
// process window size, position etc.
var ControlEnum = XMLO.selectSingleNode(WindowXMLPath + "Controls").childNodes;
// error: object required (-2146827864)
}
}
Following instructions here:
http://www.devguru.com/technologies/xmldom/quickr...de_childNodes.html