Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default XML downlaod through visual basic - tag problem

Hi there,

I am working my way through xml and am stuck with a small problem. I am

currently downloading all of the xml of a particular site but I only
want the tag of ("Openings").
Below is the code that I am using to download the data:


Sub stockp()
Dim oXMLDOMElement As New MSXML2.DOMDocument30
Dim nodelistOpenings As IXMLDOMNodeList
Dim TestWebService As New clsws_stocks


Set nodelistOpenings = oXMLDOMElement.getElementsByTagName("Openings")



Set nodelistOpenings = TestWebService.wsm_stocks("1234", "ASX")
Application.Goto Reference:="stockTarget"
ActiveCell.FormulaR1C1 = nodelistOpenings.Item(0).Text


End Sub


The above doesn't provide the filter that I wanted ie I only wanted
"Openings" but it provides all the data on the applicable page. Does
anybody have any ideas?


Regards,
Andrew

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default XML downlaod through visual basic - tag problem

Andrew,

I think you need to be more specific in your "Openings" - this should be a
well formed XPath query. I think you need to give the root detail (something
like "x/y/Openings"?).

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"Andrew Yates" wrote:

Hi there,

I am working my way through xml and am stuck with a small problem. I am

currently downloading all of the xml of a particular site but I only
want the tag of ("Openings").
Below is the code that I am using to download the data:


Sub stockp()
Dim oXMLDOMElement As New MSXML2.DOMDocument30
Dim nodelistOpenings As IXMLDOMNodeList
Dim TestWebService As New clsws_stocks


Set nodelistOpenings = oXMLDOMElement.getElementsByTagName("Openings")



Set nodelistOpenings = TestWebService.wsm_stocks("1234", "ASX")
Application.Goto Reference:="stockTarget"
ActiveCell.FormulaR1C1 = nodelistOpenings.Item(0).Text


End Sub


The above doesn't provide the filter that I wanted ie I only wanted
"Openings" but it provides all the data on the applicable page. Does
anybody have any ideas?


Regards,
Andrew


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with a very simple code in Visual basic Vepa Excel Programming 4 January 25th 06 03:42 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
Visual Basic problem Carol Lutz Excel Programming 3 August 20th 03 04:03 PM
Visual Basic Problem with Chr(34) Tom Ogilvy Excel Programming 0 August 6th 03 01:20 PM
Visual Basic Problem with Chr(34) Chip Pearson Excel Programming 0 August 6th 03 01:16 PM


All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"