qaziasim
asked on
i m using TransformNodeToObject but can get HTML,
rsult.xml is returning me my XML packet , i want Html after transformation plz help
<%
set Source = server.CreateObject("MSXML 2.DomDocum ent")
Set stylesheet = server.CreateObject("MSXML 2.DomDocum ent")
Set result = server.CreateObject("MSXML 2.DomDocum ent")
Source.async = False
Source.Load "e:\multitest\new\default. xml"
stylesheet.async = False
stylesheet.Load "e:\multitest\new\default. xsl"
result.async = False
result.validateOnParse = True
Set objRoot = source.documentElement
Call objRoot.transformNodeToObj ect(objRoo t,result)
Response.Write result.xml
Response.End
%>
<%
set Source = server.CreateObject("MSXML
Set stylesheet = server.CreateObject("MSXML
Set result = server.CreateObject("MSXML
Source.async = False
Source.Load "e:\multitest\new\default.
stylesheet.async = False
stylesheet.Load "e:\multitest\new\default.
result.async = False
result.validateOnParse = True
Set objRoot = source.documentElement
Call objRoot.transformNodeToObj
Response.Write result.xml
Response.End
%>
You should always check the results of the load opeations since almost anything can go wrong. Check that Source.ParseError.errorCod e and stylesheet.ParseError.erro rCode are both zero.
<%
MyHTMLCode = objRoot.transformNodeToObj ect(styles heet)
Response.Write MyHTMLCode
%>
MyHTMLCode = objRoot.transformNodeToObj
Response.Write MyHTMLCode
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There are three options :
1. XML not well formed.
2. XSL not well formed.
3. The transformation of the XML and the XSL is, indeed an empty string (no matching templates).
Try to debug and see if you have an errMsg in the result object.