Click to See Complete Forum and Search --> : Modify XML after XSL transformation


hermzz
05-29-2005, 03:32 PM
I have a XML file and a XSL file to transform the XML into HTML. I need a way to modify the XML after the XSL transformation using JavaScript. With IE using document.XMLDocument and document.XSLDocument it is posible to read and modify the raw data, but this doesn't work in Gecko-based browsers and probably in any other browser that isn't IE.

So my question is, is there an equivalent of document.XMLDocument for other browsers?

If I've been a moron and document.XMLDocument does work with Gecko-based browsers... then how do I use it?

Khalid Ali
05-31-2005, 12:53 PM
you can use XMLHttpRequest object for both browsers however I don't think you can load stylesheets just as you can in IE, what you will have to do is apply stylesheets in xml file instead.
Here is a link (http://www.webapplikations.com/pages/html_js/xmlstuff/XMLHttpRequest.html) hope this explains the first part I mentiioned above.

hermzz
05-31-2005, 01:40 PM
Hmm... so you suggest grabbing the XML through xmlhttprequest each time I need to re-do the XSL transformations?

So I would have a file with nothing more than the bare html/xml and a Javascript that calls the xml file which includes the link to the stylesheet. Is that correct?