View XML File via XMLDOM and XSLT
I have an XML file which i transform using an XSL file. In ASP i use the following code to change a couple of variables in the XML file before transforming it with the XSL file (the variables determine which parts of the xml are displayed);
'--Select Parameters element and amend according to querystring info
set objNode = objXML.getElementsByTagName("parameters")
set objXSL = Server.CreateObject("Microsoft.XMLDOM")
objXSL.async = false
Set objXML = nothing
Set objXSL = nothing
Set objNode = nothing
The xml file looks like this;
<!--Updated from view.asp page-->
<parameters id_view="10" columns="1" id_image="dr0001"/>
......all the other elements
It works fine but I am not sure this is the best way to achieve my aim (which is to have an xml file which has the content details formatted by the XSL based on variables set on obtained from an .asp page).
Any advice would be gratefully accepted.
There is nothing wrong wit h your XML part of the code for setting up an attribute.And yes to change the attributes thats the way to do it.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)