Link to home
Start Free TrialLog in
Avatar of qaziasim
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("MSXML2.DomDocument")
Set stylesheet = server.CreateObject("MSXML2.DomDocument")    
Set result = server.CreateObject("MSXML2.DomDocument")
 
  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.transformNodeToObject(objRoot,result)
 
  Response.Write result.xml
  Response.End
  %>
Avatar of avner
avner

If the result is of result.xml is an empty string that means that you have a problem in the transformation.

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.
You should always check the results of the load opeations since almost anything can go wrong. Check that Source.ParseError.errorCode and stylesheet.ParseError.errorCode are both zero.
Avatar of sybe
<%
MyHTMLCode = objRoot.transformNodeToObject(stylesheet)
Response.Write MyHTMLCode
%>
ASKER CERTIFIED SOLUTION
Avatar of BigRat
BigRat
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial