asp中如何创建CDATA节点并插入数据
asp中如何创建CDATA节点并插入数据
最好给个完整的例子
[解决办法]
Set objNode = xmlDoc.documentElement;
Set objNewCDATA = xmlDoc.createCDATASection( "This is a CDATA Section ")
docObj.appendChild(objNewCDATA)
xmlDoc.Save Server.MapPath( "yourxml.xml ")
[解决办法]
错了
docObj.appendChild(objNewCDATA)
改
objNode.appendChild(objNewCDATA)
[解决办法]
Set objNode = xmlDoc.documentElement
Set oblNewElem = xmlDoc.createElement( "cont ")
Set oblNewChild = xmlDoc.createElement( "nameid ")
Set objNewCDATA = xmlDoc.createCDATASection( "This is a CDATA Section ")
oblNewChild.appendChild(objNewCDATA)
oblNewElem.appendChild(oblNewChild)
objNode.appendChild(oblNewElem)
xmlDoc.Save Server.MapPath( "yourxml.xml ")
[解决办法]
UP!