Lotus Notes - Buscar texto en archivo .xml anexo a correo Lotus Notes

 
Vista:
sin imagen de perfil

Buscar texto en archivo .xml anexo a correo Lotus Notes

Publicado por Alexia (2 intervenciones) el 29/07/2014 00:39:22
Buenas tardes, necesito crear un agente en una aplicación Lotus Notes para que al recibir correos se verifique si existe un tag named con cierto valor y así reenviar el correo a una base específica. Agradezco el apoyo que puedan brindarme al respecto.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Buscar texto en archivo .xml anexo a correo Lotus Notes

Publicado por ElLobo (56 intervenciones) el 21/10/2015 15:59:04
Veamos.

Si el fichero xml viene anexado en el correo.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Public Function getDOM() As Variant
 
		Dim oXML As Variant
 
		Set oXML  = CreateObject( "Msxml2.DOMDocument" )
 
		oXML.async = False
		oXML.resolveExternals = False
 
		Set getDOM = oXML
 
End Function
Public Function getDomFromURI( sURI As String ) As Variant
 
		Dim oXML As Variant
 
		Set oXML = getDom()
 
		Call oXML.load( sURI )
 
		If oXML.parseError.errorCode <> 0 Then
			Error 9999 , oXML.parseError.reason & " - " & oXML.parseError.srcText
		End If
 
		Set getDomFromURI = oXML
 
End Function

=============================================
Despues de extraer el fichero XML al disco
=============================================

1
2
3
4
5
6
7
8
9
10
Set oXML = getDomFromURI("c:\temp\file.xml")
 
Call oXML .setProperty("SelectionLanguage", "XPath")
 
 
Set nodeBook = xmlDoc.selectSingleNode("//book");
 
If nodeBook .getAttribute("aqui el nombre del atributo") = "1" Then
    bla bla bla ....
End If

O si es el valor de un nodo

1
2
3
Set currNode = oXML .selectSingleNode("//book/author")
 
MsgBox(currNode.text)

Algo asi creo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar