¿Cómo crear XML a partir de XML utilizando XSL?¿Cómo crear XML a partir de XML utilizando XSL?
que trato como esto .. pero no obtengo un resultado
Test.Xml
<Address>
<name> Alex</name>
<lastname>Mathew</lastname>
</Address>
Prueba.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>
Necesito hacia fuera puesto como esto
<Address>
<FirstName> Alex</FirstName>
<LastName>Mathew</LastName>
</Address>
Intento convertir en mi asp pa ge (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 me ayude a resolver este problema
+1 Incluso mejor que eso sería usar ' ' en lugar de 'xsl: value-of'. –
@DevNull Eso es discutible. Genéricamente hablando, sí; hablando en términos de la situación particular, no realmente. – Tomalak