hi,
i'm making a little VB program that has to read an XML file.
xml file:
how can I get the value of for example name?
this is what I've got so far (but doens't work)
I always get the next value in the textbox: System.Xml.XmlAttribute
What am I doing wrong here?
i'm making a little VB program that has to read an XML file.
xml file:
HTML:
<Titles>
<Title name="The Notebook" title="The Notebook" originaltitle="" year="2004" identifier="tt0332280" />
</Titles>
how can I get the value of for example name?
this is what I've got so far (but doens't work)
VB.NET:
'XmlDoc contains the XML file
Dim xpath As String = lstTitles.SelectedItem.ToString
Dim xmlnode As XmlNode = XmlDoc.SelectSingleNode("//Titles/Title[@name='" & xpath & "']")
txtTitle.text = xmlnode.Attributes.GetNamedItem("originaltitle").ToString
What am I doing wrong here?