我有以下功能来包含 cdata:
Function cdatasection()
Dim objDom As DOMDocument
Dim objKMLRootelement As IKMLDOMElement
Dim objKMLelement As IKMLDOMElement
Dim cdata As IKMLDOMCDATASection
Set objDom = New DOMDocument
Set objKMLRootelement = objDom.createElement("BalloonStyle")
objDom.appendChild objKMLRootelement
Set objKMLelement = objDom.createElement("text")
objKMLRootelement.appendChild objKMLelement
Set cdata = objDom.createCDATASection("text")
cdata.Data = "<![CDATA[<b>Latitude = $[latitude]</b>?]]>;"
End Function
当我运行上述程序时,我收到此函数的错误“未找到用户定义的数据类型”。