hi friends,
How create XML from XML using XSL ?
I try like this.. but i not get a result
Test.xml
<Address>
<name> Alex</name>
<lastname>Mathew</lastname>
</Address>
Test.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<Address>
<FirstName><xsl:value-of select="name" /></FirstName>
<LastName><xsl:value-of select="lastname" /></LastName>
</Address>
</xsl:template>
</xsl:stylesheet>
I need out put like this
<Address>
<FirstName> Alex</FirstName>
<LastName>Mathew</LastName>
</Address>
I try to convert in my asp page (test.asp)
<%
'Load XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load(Server.MapPath("Test.xml"))
'Load XSL
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("Test.xsl"))
'Response.Write(xml.transformNode(xsl))
'Response.ContentType = "text/plain; charset=UTF-8"
Set doc = Server.CreateObject("Msxml2.DOMDocument.3.0")
doc.async = False
doc.loadXML(xml.transformNode(xsl))
response.write xml.transformNode(xsl)
response.write doc.getElementsByTagName("FirstName").item(0).text
%>
Plz help me solve this problem