OleObject lo_xmldoc
OleObject lo_node
OLEObject lo_nodelist
lo_xmldoc = CREATE OLEObject
lo_nodelist = CREATE OLEObject
ll_Return = lo_xmldoc.ConnectToNewObject( "MSXML.DOMDocument" ) //STATEMENT
#1
as_xml = Mid(as_xml,9,Len(as_xml))
as_xml = Mid(as_xml,1, Len(as_xml) - 9)
ls_xml = as_xml
Do While Len(ls_xml) > 0
ls_xml1 = Mid(ls_xml,1,Pos(Lower(ls_xml),"</stage>")+7)
lo_xmldoc.loadxml(ls_xml1)
lo_nodelist = lo_xmldoc.SelectSingleNode("Stage").childNodes //STATMENT #2
I don't have much experience on OLE either, but I've used it
to connect to a excel sheet. When I did that, I had an
statement just like your statement #1, except that instead
of "MSXML.DOMDocument", I used "Excel.Application".
This statement connected me to MS Excel, and then I could
change the value/properties of an excel sheet.
Seems like your trying to open some XML Document. I think
what you need is the XML program to handle this XML. After
that, your statements should all work.
"JHP" <goawa...@GFY.com> wrote in message news:406c837b$1@forums-1-dub...
> I'm on WindowsXP Pro...
>
> The following is some sample code for the attached file - and it works
ok -
> If you need any help just let me know?
>
> OLEObject ole_DOM, ole_node
>
> ole_DOM = CREATE OLEObject
> ole_DOM.ConnectToNewObject("MSXML2.DOMDocument")
> ole_DOM.Async = False
> ole_DOM.ValidateOnParse = False
> ole_DOM.ResolveExternals = False
> ole_DOM.PreserveWhiteSpace = False
> ole_DOM.SetProperty("ServerHTTPRequest", True)
>
> If ole_DOM.Load("C:\Sample.xml") Then
> ole_node = ole_DOM.GetElementsByTagName("description")
>
> If ole_node.Length > 0 Then MessageBox("Node",
> String(ole_node.Item(1).NodeTypedValue))
>
> End If
> DESTROY ole_DOM
>
> "Laurel" <Fake...@Hotmail.com> wrote in message
> news:406afe8f$1@forums-1-dub...
http://www.xlon6.com/support/kb.php/2002
You may want to try "MSXML2.DOMDocument" instead of "MSXML.DOMDocument"...
Good luck!
"Laurel" <Fake...@Hotmail.com> wrote in message
news:406dc27c$1@forums-1-dub...