appendData Method
Appends the supplied string to the existing string data.
oXMLDOMCharacterData.appendData(data);
Parameters
Example
The following script example creates an IXMLDOMComment object and uses the appendData method to add text to the string.
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.6.0"); var comment; xmlDoc.async = false; xmlDoc.loadXML("<root></root>"); if (xmlDoc.parseError.errorCode != 0) { var myErr = xmlDoc.parseError; WScript.Echo("You have error " + myErr.reason); } else { comment = xmlDoc.createComment("Hello..."); comment.appendData(" ... World!"); WScript.Echo(comment.data); }
Output
Hello... ... World! | |