nedcomp hosting homepage

Producten en Diensten
Dedicated servers
Datacenter informatie
Partners, resellers
Helpdesk informatie
Technische docs, tools
Support homepage
ASP componenten
Praktische ASP, ASP.NET
Visual route server
Whois (domein gegevens)
Software documentatie
Whitepapers
Zoeken
Nedcomp / algemeen

Zoeken
 

Copyright © Nedcomp Hosting
Telefoon nr :   +31 184 670111
Fax nummer :   +31 184 631384
E-mailadres :   info@nedcomp.nl
 

Microsoft XML Core Services (MSXML) 4.0 - DOM Reference

transformNode Method

Processes this node and its children using the supplied XSL Transformations (XSLT) style sheet and returns the resulting transformation.

[Script]

Script Syntax

strValue = oXMLDOMNode.transformNode(objStylesheet);

Parameters

objstylesheet
An object. A valid XML document or DOM node that consists of XSLT elements that direct the transformation of this node.

Return Value

A string. Returns a string that contains the product of the transformation of this XML document based on the XSLT style sheet.

Example

The following Microsoft® JScript® example fills an HTML DIV tag with the result of transformNode.

<SCRIPT>
  // Load data.
  var source = new ActiveXObject("Msxml2.DOMDocument.4.0");
  source.async = false;
  source.load("books.xml");
 
  // Load style sheet.
  var stylesheet = new ActiveXObject("Msxml2.DOMDocument.4.0");
  stylesheet.async = false
  stylesheet.load("sample.xsl");
 
  // Fill a div tag with the result of the transform
  divInfo.innerHTML = source.transformNode(stylesheet);
</SCRIPT>
[Visual Basic]

Visual Basic Syntax

strValue = oXMLDOMNode.transformNode(objStylesheet)

Parameters

objstylesheet
An object. A valid XML document or DOM node that consists of XSLT elements that direct the transformation of this node.

Return Value

A string. Returns a string that contains the product of the transformation of this XML document based on the XSLT style sheet.

Example

The following Microsoft® Visual Basic® example displays the result of transformNode.

Dim source As New Msxml2.DOMDocument40
Dim stylesheet As New Msxml2.DOMDocument40

' Load data.
source.async = False
source.Load "books.xml"
 
' Load style sheet.
stylesheet.async = False
stylesheet.Load "sample.xsl"

' Do the transform
MsgBox source.transformNode(stylesheet)
[C/C++]

C/C++ Syntax

HRESULT transformNode(
    IXMLDOMNode *stylesheet,
    BSTR *xmlString);

Parameters

stylesheet [in]
A valid XML document or DOM node that consists of XSLT elements that direct the transformation of this node.
xmlString [out, retval]
A string that contains the product of the transformation of this XML document based on the XSLT style sheet.

C/C++ Return Values

S_OK
The value returned if successful.
E_INVALIDARG
The value returned if stylesheet or xmlString is Null.

Remarks

The stylesheet parameter must be either a DOMDocument node, in which case the document is assumed to be an Extensible Stylesheet Language (XSL) style sheet, or a Document Object Model (DOM) node in the XSL style sheet, in which case this node is treated as a standalone style sheet fragment.

The source node defines a context in which the style sheet operates, but navigation outside this scope is allowed. For example, a style sheet can use the id function to access other parts of the document.

This method supports both standalone and embedded style sheets and also provides the ability to run a localized style sheet fragment against a particular source node.

This member is an extension of the Worldwide Web Consortium (W3C) DOM.

For more information about XSLT style sheets, see the XSLT Reference.

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

Using XSLT with DOM or SAX | id Function

Applies to: IXMLDOMAttribute | IXMLDOMCDATASection | IXMLDOMCharacterData | IXMLDOMComment | DOMDocument | IXMLDOMDocumentFragment | IXMLDOMDocumentType | IXMLDOMElement | IXMLDOMEntity | IXMLDOMEntityReference | IXMLDOMNode | IXMLDOMNotation | IXMLDOMProcessingInstruction | IXMLDOMText


Download de SDK