Jangogo :
Function ReadXML(sXML As String, ByVal bForceReturnBoolean As Boolean, Optional ModuleID As String, Optional Where As String, Optional Where2 As String) As Variant '这个函数用户处理SC的返回信息,注意 返回值是一个变体, '当bForceReturnBoolean 为true的时候会返回 Boolean '否则会返回一个XMLDom对象 '后三个参数说明从哪里调用了这个函数,在出错的时候便于反馈 '本函数最好配合 MyApp.AddErr() 来使用,以自动服务器返回的信息(REST) Function getXDOM() As Object '创建一个XMLDOM '把字符串封装为xml字符串,原型如下: Function xml(s As String, Optional ByVal ns As String = "") As String On Error Resume Next If ns <> "" Then ns = " " & ns xml = "<root" & ns & ">" & s & "</root>" End Function
'在XML文档中取得一个节点的值 Function GetXValue(ByVal xD As Object, NodeName As String) As String On Error Resume Next GetXValue = xD.getElementsByTagName(NodeName)(0).Text End Function
说明:这些函数和U盘版的Sheeta对象的函数基本一致
文档中心