|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to solve this " problemI am accessing a value in a XML value: news.Load(Server.MapPath("xml/ news.rss")) newslabel.Text = CType(news.SelectSingleNode("rss version="2.0 "/channel/title").InnerText, String) The XML file: <?xml version="1.0"?> <rss version="2.0"> <channel> <title>News</title> <description>...</description> <item> <title>...</title> <description>...</description> </item> ... </channel> </rss> If I take the <rss version="2.0"> and use: newslabel.Text = CType(news.SelectSingleNode("channel/title").InnerText, String) Can you tell me how to solve this? The problem is in my node path when I have ("rss version="2.0"/channel/title") I used =" instead of " to try to fix the problem but it didn't work. Thanks, Miguel Shapper wrote:
Show quoteHide quote > Hello, use> > I am accessing a value in a XML value: > news.Load(Server.MapPath("xml/ news.rss")) > newslabel.Text = CType(news.SelectSingleNode("rss version="2.0 > "/channel/title").InnerText, String) > > The XML file: > > <?xml version="1.0"?> > <rss version="2.0"> > <channel> > <title>News</title> > <description>...</description> > <item> > <title>...</title> > <description>...</description> > </item> > ... > </channel> > </rss> > > If I take the <rss version="2.0"> and use: > newslabel.Text = > CType(news.SelectSingleNode("channel/title").InnerText, String) > > Can you tell me how to solve this? The problem is in my node path > when I have ("rss version="2.0"/channel/title") > > I used =" instead of " to try to fix the problem but it didn't > work. > > Thanks, > Miguel SelectSingleNode("/rss[@version='2.0']/channel/title") or just SelectSingleNode("/rss/channel/title") Hans Kesting
Other interesting topics
No two-way databinding
How solve this IF Then problem? javascript datagrid events inside item template if(blah) alert box else somethinge useful container.dataitem cast throws exception PDF Letters writing logs to a web page code continues after stop debugging How to Stop a Function? datagrid - do not refresh the contents in the grid |
|||||||||||||||||||||||