• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

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
  %>
0
qaziasim
Asked:
qaziasim
  • 2
1 Solution
 
avnerCommented:
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.
0
 
BigRatCommented:
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.
0
 
sybeCommented:
<%
MyHTMLCode = objRoot.transformNodeToObject(stylesheet)
Response.Write MyHTMLCode
%>
0
 
BigRatCommented:
Why are we doing a transformNodeToObject at all???

Response.write objRoot.transformNode(stylesheet)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now