You are currently viewing the Javascript section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
Hi,
I'm trying to transform a xml buffer using an xsl file in javascript. I'm used "transformToDocument / transformToFragment " methods . Everthing works as long as the xml and xsl are kept as files.
If i use xmlhttp to load the xml file and place it in a buffer and use an xsl file to transform it then, the problem occurs.
The Problem i'm facing is , The xsl file is show as html in the firefox browser. But there is no xml data shown. I'm pasting the code i'm using here.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<script language="javascript">
var xslStylesheet;
var xsltProcessor = new XSLTProcessor();
var myDOM;
var xmlDoc;
// load the xslt file, example1.xsl
var myXMLHTTPRequest = new XMLHttpRequest();
myXMLHTTPRequest.open("GET", "example1.xsl", false);
myXMLHTTPRequest.send(null);
sorry again to repeat. The transformation is good when we are using the xml from a file for transforming. If it is placed in a buffer then the xsl is shown in the browser but with no xml data. This problem is only in the Firefox browser