LotusScript解析XML字符串
来源:互联网 发布:卓智网络破解 编辑:程序博客网 时间:2024/06/05 21:55
'-----------------------------------------------------------
'-函数功能:从给定的XML中提取结点中的值
'-参数说明:
'-返回值:返回结果链表
'-----------------------------------------------------------
On Error GoTo errh
Dim XMLProcessor As NotesDOMParser
Dim root As NotesDOMDocumentNode
Dim nodelist As NotesDOMNodeList
Dim nodevalList List As String
MsgBox xmlStr
If xmlStr<>"" Then
Set XMLProcessor = session.CreateDOMParser(xmlStr)
Call XMLProcessor.Process
Set root = XMLProcessor.Document
nodevalList("Result") = GetNodeValue(root,"Result")
nodevalList("Reason") = GetNodeValue(root,"Reason")
Else
GetKeys = False
End If
GetKeys = True
Exit Function
errh:
MsgBox "Agent:selectAgent_GetKeys:"
MsgBox Error
MsgBox Erl
GetKeys = False
Exit Function
End Function
-------------------------------------------------------------------------------------------------------------------------------
Function GetNodeValue(node As NotesDOMDocumentNode,tagName As String) As String
'-----------------------------------------------------------
'-函数功能:从指定的XML结点中获取结点值
'-参数说明:
'-返回值:返回结果链表
'-----------------------------------------------------------
On Error GoTo errh
Dim nodelist As NotesDOMNodeList
Dim elementNode,textNode As NotesDOMNode
Set nodelist = node.GetElementsByTagName(tagName)
If nodelist.NumberOfEntries<>0 Then
Set elementNode = nodelist.GetItem(1)
If Not elementNode.isNull Then
Set textNode = elementNode.FirstChild
If Not textNode.isNull Then
GetNodeValue = textNode.NodeValue
Else
GetNodeValue = ""
End If
End If
End If
Exit Function
errh:
MsgBox "Agent:selectAgent_GetNodeValue:"
MsgBox Error
MsgBox Erl
Exit Function
End Function
- LotusScript解析XML字符串
- LotusScript 调用WSDL 并解析Json字符串
- LotusScript格式化字符串
- 解析xml的字符串
- java解析xml字符串
- java解析xml字符串
- jdom 解析xml字符串
- 字符串xml 解析
- DOM 解析字符串XML
- C#解析XML字符串
- 解析xml字符串
- 解析xml字符串2
- DOM解析XML字符串
- Python解析XML字符串
- Python解析XML字符串
- 解析xml字符串
- jquery 解析XML字符串
- dom4j解析xml字符串
- 面试题:八皇后问题(N皇后问题)
- Servlet仿CSDN动态验证码的生成-带数字和字母
- 【C#】NPlot使用
- Electron入门资源
- android基本架构
- LotusScript解析XML字符串
- 平均分割数组
- unity学习之飞机大战制作 关键点(四) 设置敌机和奖励物品的生成和随机
- 类调用堆栈stdcall thiscall
- 表单标签
- C#控制台程序中处理2个关闭事件的代码实例
- C++调用Matlab && Matlab调用C++
- mysql中存在索引但不使用情况详解
- Java8的CompletableFuture异步调用