endChild objFieldValue1
objField.appendChild objFieldValue2
next
Set objPI = objDom.createProcessingInstruction("xml","version=''1.0''")
objDom.insertBefore objPI, objDom.childNodes(0)
objDom.Save "f:\xml\"&jxname&".xml"
''//////////释放资源
Set objDom = Nothing
Set objRoot = Nothing
Set objField = Nothing
Set objFieldValue = Nothing
Set objattID = Nothing
Set objattTabOrder = Nothing
Set objPI = Nothing
Set PINode=Nothing
%>
3. 用xsl显示提交的xml,list.xsl
<?xml version="1.0" encoding="gb2312" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body style="background:#DFEEBB"><left>
<h3>姓名:<xsl:value-of select="kucunbiao/jxname"/></h3>
<h3>地址:<xsl:value-of select="kucunbiao/jxadd"/></h3>
<h3>电话:<xsl:value-of select="kucunbiao/jxtel"/></h3>
<table border="1" width="600">
<xsl:apply-templates select="kucunbiao/kucun" >
</xsl:apply-templates>
</table></left>
</body>
</html>
</xsl:template>
<xsl:template match="kucun">
<tr>
<td width="60%"><div align="center">名称</div></td>
<td width="20%"><div align="center">规格</div></td>
<td width="20%"><div align="center">数量</div></td>
</tr>
<xsl:for-each select="field">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="guige"/></td>
<td><xsl:value-of select="shuliang"/></td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>