root>" End If End Sub
Rem 保存发送请求xml数据到文件,文件名为sendxml_日期.txt Public Sub SaveSendXmlDataToFile() Dim filename,str filename = "sendxml_" & DateValue(now) & ".txt" str = "" str = str & ""& Now() & vbNewLine str = str & "---------------------------------------------"& vbNewLine str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine str = str & XmlDoc.documentElement.XML & vbNewLine str = str & "---------------------------------------------"& vbNewLine str = str & vbNewLine & vbNewLine & vbNewLine WriteStringToFile filename,str End Sub
Rem 保存返回XML数据到文件,文件名为getxml_日期.txt Public Sub SaveGetXmlDataToFile() Dim filename,str filename = "getxml_" & DateValue(now) & ".txt" str = "" str = str & ""& Now() & vbNewLine str = str & "---------------------------------------------"& vbNewLine If IsObject(m_GetXmlDoc) Then str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine str = str & m_GetXmlDoc.documentElement.XML Else str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine & "<root>" & vbNewLine & "</root>" End If str = str & vbNewLine str = str & "---------------------------------------------"& vbNewLine str = str & vbNewLine & vbNewLine & vbNewLine WriteStringToFile filename,str End S |