From: Jim Bunton on
I believe I have retrieved an XMLDom Object
------------------------------------
Set XMLdoc = CreateObject("Microsoft.XMLDOM")
LoadStr =
"http://www.textmarketer.biz/services/rest/deliveryReports?"
LoadStr = LoadStr & "username=" & UserId
LoadStr = LoadStr & "&password=" & Pw
'Debug.Print LoadStr
XMLdoc.async = False
If XMLdoc.Load(LoadStr) Then
'definitely got an XMLDom object here!
---------------------------------------

I know roughly what's in it
------It's like this ----------------------------------------
<response processed_date="2010-03-19T15:20:49+00:00">

<userdirectory>aBcDeFgHiJkLmNoPqRsTuVwZ</userdirectory>

<reports quantity="2" >

<report name="test-190310"
last_updated="2010-03-19T09:45:04+00:00" extension="csv"/>

<report name="GatewayAPI_08-03-10"
last_updated="2010-03-08T15:45:02+00:00" extension="csv"/>

</reports>
-------------------------------------------------------

I've had a look at some web pages on parsing it but keep coming up with
'doesn't have this property
eg Debug.Print XMLdoc.Title
Debug.Print XMLdoc.getElementById("intro").innerHTML

Rather than get resonably proficeint with how to parse an XML document using
XMLdoc properties and methods which could take some time. I wiould just like
to retrieve the text in the odject.

Then I can cobble together getting out of it what I want by serching and
extracting from this string.

So XMLdoc ??what?? will get me the sting is what I would like to know please
--
Jim Bunton


From: Dee Earley on
On 20/05/2010 19:49, Jim Bunton wrote:
> I believe I have retrieved an XMLDom Object
> ------------------------------------
> Set XMLdoc = CreateObject("Microsoft.XMLDOM")
> LoadStr =
> "http://www.textmarketer.biz/services/rest/deliveryReports?"
> LoadStr = LoadStr& "username="& UserId
> LoadStr = LoadStr& "&password="& Pw
> 'Debug.Print LoadStr
> XMLdoc.async = False
> If XMLdoc.Load(LoadStr) Then
> 'definitely got an XMLDom object here!
> ---------------------------------------
>
> I know roughly what's in it
> ------It's like this ----------------------------------------
> <response processed_date="2010-03-19T15:20:49+00:00">
>
> <userdirectory>aBcDeFgHiJkLmNoPqRsTuVwZ</userdirectory>
>
> <reports quantity="2">
>
> <report name="test-190310"
> last_updated="2010-03-19T09:45:04+00:00" extension="csv"/>
>
> <report name="GatewayAPI_08-03-10"
> last_updated="2010-03-08T15:45:02+00:00" extension="csv"/>
>
> </reports>
> -------------------------------------------------------
>
> I've had a look at some web pages on parsing it but keep coming up with
> 'doesn't have this property
> eg Debug.Print XMLdoc.Title
> Debug.Print XMLdoc.getElementById("intro").innerHTML
>
> Rather than get resonably proficeint with how to parse an XML document using
> XMLdoc properties and methods which could take some time. I wiould just like
> to retrieve the text in the odject.

There is no intro element in the sample you posted, but that could
should work fine.
I normally access them by XPath or drilling down though:

Set File = New DOMDocument
File.Load FileName

'Load the relevant settings node
Set Node =
File.selectSingleNode("settings/users/setting[@name='hadadminwarning']")
If Not Node Is Nothing Then

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)