Hi there,
Could you please help on how to insert a xml data from url
http://www.alineah.com/customers.xml
output
- <ROOT>
- <Customers>
<CustomerId>1111</CustomerId>
<CompanyName>Sean Chai</CompanyName>
<City>NY</City>
</Customers>
- <Customers>
<CustomerId>1112</CustomerId>
<CompanyName>Tom Johnston</CompanyName>
<City>LA</City>
</Customers>
- <Customers>
<CustomerId>1113</CustomerId>
<CompanyName>Institute of Art</CompanyName>
</Customers>
</ROOT>
and insert this data to my mssql database...
my code
<%
url="http://www.alineah.com/customers.xml"
set xml = Server.CreateObject("MSXML2.DOMDocument")
xml.async = false
xml.setProperty "ServerHTTPRequest", true
xml.load(url)
'Load XSL
set xsl = Server.CreateObject("MSXML2.DOMDocument")
xsl.async = false
xsl.load(Server.MapPath("xstyle/prov.xsl"))
'Transform file
Response.Write(xml.transformNode(xsl))
%>
xsl code
<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:include href="prov_css.xsl"/>
<xsl:template match="/">
<xsl:call-template name="style1" />
<div>
<xsl:for-each select="ROOT">
<xsl:for-each select="Customers">
<div class="label001"><xsl:value-of select="CompanyName"/></div><BR />
</xsl:for-each>
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>