input Property
Collapse the table of content
Expand the table of content

input Property


Specifies which XML input tree to transform.

var objXMLDOMNode = objXSLProcessor.input;
objXMLDOMXSLProcessor.input = objXMLDOMNode;

This JSCript example uses the XSLT resource file, sample2.xsl, listed later in this topic.

var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
var xslProc;
xslDoc.async = false;
if (xslDoc.parseError.errorCode != 0) {
   var myErr = xslDoc.parseError;
   WScript.Echo("You have error " + myErr.reason);
} else {
   xslt.stylesheet = xslDoc;
   var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
   xmlDoc.async = false;
   if (xmlDoc.parseError.errorCode != 0) {
      var myErr = xmlDoc.parseError;
      WScript.Echo("You have error " + myErr.reason);
   } else {
      xslProc = xslt.createProcessor();
      xslProc.input = xmlDoc;

Set objXMLDOMNode = objXSLProcessor.input
objXMLDOMXSLProcessor.input = objXMLDOMNode


The Visual Basic and Jscript examples use the following XSLT file.

<xsl:stylesheet xmlns:xsl="" version="1.0">
    <xsl:output method="html"/>
    <xsl:param name="param1"/>
    <xsl:template match="/">
    <xsl:template match="/" mode="edit">
        In Edit Mode
    <xsl:template match="/" mode="view">
        In View Mode

HRESULT get_input (VARIANT * pVar);
HRESULT put_input (VARIANT pVar);

 pVar[out, retval][in]

The input XML to which to apply the transformation. This can be a URL (string/BSTR), a DOMDocument object, an IXMLDOMNodeor any object that supports ISequentialStream, IStream, or IPersistStream. If applying the transformation to an IXMLDOMNode, any node type and any threading model can be specified. If this argument is Null, the existing input will be cleared.


The value returned if readyState is READYSTATE_INTERACTIVE.


The value returned if the variant is not VT_DISPATCH or VT_UNKNOWN.


The value returned if the argument does not support IStream or IXMLDOMNode.

Setting this property resets the state of the processor.

Implemented in:

MSXML 3.0, MSXML 6.0


© 2015 Microsoft