473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to solve this " problem

Hello,

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=&quot;2.0&quot;/channel/title")

I used =&quot; instead of " to try to fix the problem but it didn't
work.

Thanks,
Miguel

Nov 19 '05 #1
1 1275
Shapper wrote:
Hello,

I am accessing a value in a XML value:
news.Load(Server.MapPath("xml/ news.rss"))
newslabel.Text = CType(news.SelectSingleNode("rss version=&quot;2.0
&quot;/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=&quot;2.0&quot;/channel/title")

I used =&quot; instead of " to try to fix the problem but it didn't
work.

Thanks,
Miguel


use

SelectSingleNode("/rss[@version='2.0']/channel/title")

or just

SelectSingleNode("/rss/channel/title")
Hans Kesting
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jon | last post by:
Hi all! In a insert-trigger I have two joins on the table named inserted. Obviously this construction gives a name collition beetween the two joins (since both joins starts from the same table) ...
7
by: Shapper | last post by:
Hello, I have an ASP:ImageButton where I want to call a function and pass a string: OnClick="Change_Photo("John")" I am having problems with "". I tried
0
by: CampaniƧo | last post by:
Hi Can anyone help me with this problem. ------------------------------ PDA Transportes.exe TypeLoadException FormTransMain::.ctor+0x2c FormTransMain::Main+0x5
13
by: Mark | last post by:
always wondered how a computer might go about doing this... i'm taking calculus at university... and we went over newton's method. i found this interesting... ------------------------------...
0
by: mrajsenkumar | last post by:
Hi I am using windowsCE 5.0, here i am try to deploy the project. but i got error message - "Connection failed. Device is not ready." tell me how to solve this problem.very urgent. i am using vs2005.
1
by: rocksoft | last post by:
Hi, i got error "class not registered" when i try to create web setup and deployment project to my web application. i'm used Asp.net and c# to my application, i created web setup and deployment...
17
by: khajeddin | last post by:
the problem is: Create a class HugeInteger which use 40-element array of digits to store integers as larg as 40 digits each.Provide methods input, output, add, subtract how to add to arrays ?
4
by: namalapavan | last post by:
hii , i am getting and error while installing oracle9i on RHEL AS 4.0 .i am sure that somebody here would be able to solve my problem.kindly reply so that i can send you the detailed error report....
1
by: brboga | last post by:
Hello, VBA gives an error on the indicated line. "tblparameters" is a database which exists. Option Compare Database Option Explicit Sub fill_parameters()
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.