Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Need Help with XML and XSLT

From: Andrew@-----------.---------.---
To: NULL
Date: 3/10/2005 6:53:00 PM
hey guys i'm trying to get xml from a cresendo server and parssing out to a 
HTML but im having some issue when i try to load my xsl. please help me out.
here is my code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<script type="text/javascript">
// Load XML 
var XMLDoc = new ActiveXObject("Msxml2.DOMDocument.3.0")
  XMLDoc.async = false
 //Loding XML from Crescendo URL
 
XMLDoc.load("http://my.site.com/crescendo/collection.asp?id=content&channel=1685&dest=3&class=living_better_features&previous=802320")
 //sorting by /assets
  var BookNode = XMLDoc.selectSingleNode("/collection/assets")
  var DataNodes = BookNode.childNodes
  
 
//  document.write("<table>");
 // for loop to pick up all the Asset id and appending url.
 var InnerXMLDoc = new ActiveXObject("Msxml2.DOMDocument.3.0")
 InnerXMLDoc.async = false
 var InnerBookNode
 var InnerDataNodes

  var OutString = "" 
  for (var i=0; i < DataNodes.length; i++) {
    //document.write("<b>" + DataNodes.item(i).nodeName + ": </b>")
   // 
document.write("http://my.site.com/crescendo/asset.asp?id="+DataNodes.item(i).firstChild.text + "<br/>")
 
InnerXMLDoc.load("http://my.mysite.com/crescendo/asset.asp?id="+DataNodes.item(i).firstChild.text)
 InnerBookNode = InnerXMLDoc.selectSingleNode("/asset")
 InnerDataNodes = InnerBookNode.childNodes 


 for (var x=0; x < InnerDataNodes.length; x++) {

  //document.write("<b><br>" + InnerDataNodes.item(x).nodeName + ": 
</br></b>")

// upto here i can do it. i can see the print out. but cant load the results 
in via XSLT.
   // Load XSLT file

}
 }
 
var xslDoc = new ActiveXObject("Microsoft.XMLDOM")
xslDoc.async = false
XMLDoc.transform("asset.xsl")
xslDoc.load("asset.xsl");
//document.write(InnerDataNodes.item(x).nodeName.transformNode(xsl))


thanks in advance.




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent