I know this is pushing the envelope, but has anyone successfully used Microsoft's XMLDOM inside roseScript?
This is my code:
Dim bOk As Boolean
Dim domXml As String
Dim objectStyle As String
Dim objectXml As String
Dim rootXml As String
Dim xhtmlDom As Object
Dim xhtmlObject As Object
Dim xhtmlRoot As Object
On Error GoTo localCatch
bOk = False
Set xhtmlDom = CreateObject("MSXML2.DOMDocument.4.0")
'Instantiate object.
xhtmlDom.async = false
bOk = xhtmlDom.load(fileName)
If bOk = True Then
domXml = "!!" + xhtmlDom.xml + "!!"
MsgBox domXml
xhtmlRoot = xhtmlDom.documentElement
If xhtmlRoot Is Not Nothing Then
rootXml = xhtmlRoot.xml
Set xhtmlObject =
xhtmlRoot.selectSingleNode("//" + xhtmlObjectId)
End If
Set xhtmlObject = xhtmlDom.selectSingleNode("id=" +
xhtmlObjectId)
objectXml = xhtmlObject.xml
objectStyle = xhtmlObject.getAttribute("style")
End If
Set xhtmlDom = Nothing
Set xhtmlObject = Nothing
reverseObjectProperties = 1
Exit Function
localCatch:
Dim sErr As String
sErr = "Error #: " + LTrim(Str(Err.Number)) + NL
sErr = sErr + "Error Desc: " + Err.Description + NL
MsgBox sErr
RoseApp.WriteErrorLog sErr
Set xhtmlDom = Nothing
Set xhtmlObject = Nothing
End Function
And it seems to choke pretty consistently.... Any ideas?
Thx
P
________________________
Peter Hazlehurst
Chief Technology Officer
Mercari Technologies
http: www.mercaritech.com
w: 703.294.6727 x367
c: 703.597.1750
f: 703.294.6516
efax: 801.457.9458 (PrivateLine)
winmail.dat
Description: application/ms-tnef
