Click here to Skip to main content
16,005,339 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: URGENT innertext problem Pin
Dustin Metzgar18-Aug-06 5:13
Dustin Metzgar18-Aug-06 5:13 
Generalinnertext problem Pin
biaali18-Aug-06 22:51
biaali18-Aug-06 22:51 
QuestionOught to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 8:13
Scott_Roberts17-Aug-06 8:13 
AnswerRe: Ought to be basic, but I'm not getting it! Pin
led mike17-Aug-06 9:06
led mike17-Aug-06 9:06 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 10:01
Scott_Roberts17-Aug-06 10:01 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
led mike17-Aug-06 10:53
led mike17-Aug-06 10:53 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 12:46
Scott_Roberts17-Aug-06 12:46 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 13:17
Scott_Roberts17-Aug-06 13:17 
Okay, I converted this to VB as follows:

Private Sub Button_Clicked(ByVal sender As Object, ByVal e As EventArgs) Handles btnWKKI.Click, btnWWWC.Click
Dim strStation As String = sender.Text

Dim xDocument As New XmlDocument()
xDocument.Load("http://distribution.customradionews.net/Forecast_XML/" & strStation & ".xml")

Dim xpPeriod As String = "//dwml/data/time-layout[2]/start-valid-time[3]/@period-name"
Dim xpTemp As String = "//dwml/data/parameters/temperature[2]/value[3]/text()"

Dim nTemp As XmlText = xDocument.SelectSingleNode(xpTemp)
Dim nPeriod As XmlAttribute = xDocument.SelectSingleNode(xpPeriod)

Console.WriteLine("{0} - {1}", nPeriod.Value, nTemp.Value)

Dim nlPeriod As XmlNodeList = xDocument.SelectNodes("//dwml/data/time-layout[2]/start-valid-time/@period-name")
Dim nlTemp As XmlNodeList = xDocument.SelectNodes("//dwml/data/parameters/temperature[2]/value/text()")

Dim n As Integer = 0
While n < nlPeriod.Count
Console.WriteLine("{0} - {1}", (nlPeriod.Item(n) as XmlAttribute).Value, (nlTemp.Item(n) as XmlText).Value)
n += 1

End While
End Sub


However, the IDE gives "Expression Does Not Produce A Value" on Console.WriteLine("{0} - {1}", (nlPeriod.Item(n) as XmlAttribute)...the second part of the statement is okay. What did I miss?

GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 16:17
Scott_Roberts17-Aug-06 16:17 
QuestionPosition in a node set Pin
whozurmommy16-Aug-06 21:11
whozurmommy16-Aug-06 21:11 
AnswerRe: Position in a node set Pin
Dustin Metzgar17-Aug-06 5:51
Dustin Metzgar17-Aug-06 5:51 
GeneralRe: Position in a node set Pin
whozurmommy17-Aug-06 8:41
whozurmommy17-Aug-06 8:41 
GeneralRe: Position in a node set Pin
Dustin Metzgar17-Aug-06 9:18
Dustin Metzgar17-Aug-06 9:18 
GeneralRe: Position in a node set Pin
whozurmommy17-Aug-06 18:58
whozurmommy17-Aug-06 18:58 
QuestionWhy it can't work wih "__uuidof(MSXML2::DOMDocument60)"? Pin
Eric Vonjacson15-Aug-06 21:21
Eric Vonjacson15-Aug-06 21:21 
QuestionXML node insertion Pin
biaali15-Aug-06 4:36
biaali15-Aug-06 4:36 
AnswerRe: XML node insertion Pin
Dustin Metzgar15-Aug-06 5:09
Dustin Metzgar15-Aug-06 5:09 
QuestionNew to XML Pin
lehya14-Aug-06 5:17
lehya14-Aug-06 5:17 
AnswerRe: New to XML Pin
Dustin Metzgar14-Aug-06 8:57
Dustin Metzgar14-Aug-06 8:57 
GeneralRe: New to XML Pin
lehya14-Aug-06 10:31
lehya14-Aug-06 10:31 
GeneralRe: New to XML Pin
Dustin Metzgar14-Aug-06 11:00
Dustin Metzgar14-Aug-06 11:00 
GeneralRe: New to XML [modified] Pin
manowj18-Aug-06 22:38
manowj18-Aug-06 22:38 
AnswerRe: New to XML Pin
Dustin Metzgar22-Aug-06 11:13
Dustin Metzgar22-Aug-06 11:13 
QuestionMS Access 2003 and Exporting in a XML Format Pin
sweep12314-Aug-06 3:53
sweep12314-Aug-06 3:53 
AnswerRe: MS Access 2003 and Exporting in a XML Format Pin
Stephen McGuire14-Aug-06 15:18
Stephen McGuire14-Aug-06 15:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.