473,378 Members | 1,594 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,378 software developers and data experts.

String Question

Hello,

I have this:
Dim news As New XmlDocument()
news.Load(Server.MapPath("xml/news.rss"))
Dim x As String = news.SelectSingleNode("editor/name").InnerText
lrsslabel.Text = x

It works. However when I replace last 2 lines as follow it doesn't work:
lrsslabel.Text = news.SelectSingleNode("editor/name").InnerText

Why? How to solve it without needing to declare the x variable?

Thanks,
Miguel

Nov 19 '05 #1
3 860
Hello
Try this:
news.SelectSingleNode("editor/name").InnerText.ToString
Regards

"Shapper" wrote:
Hello,

I have this:
Dim news As New XmlDocument()
news.Load(Server.MapPath("xml/news.rss"))
Dim x As String = news.SelectSingleNode("editor/name").InnerText
lrsslabel.Text = x

It works. However when I replace last 2 lines as follow it doesn't work:
lrsslabel.Text = news.SelectSingleNode("editor/name").InnerText

Why? How to solve it without needing to declare the x variable?

Thanks,
Miguel

Nov 19 '05 #2
snt
When you say it doesn't work, are you getting an error? If yes, what
is it? Also, is it something to do with null value?

snt
http://www.flexoweb.com

Nov 19 '05 #3
use Ctype for casting...
--

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET

"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl...
Hello,

I have this:
Dim news As New XmlDocument()
news.Load(Server.MapPath("xml/news.rss"))
Dim x As String = news.SelectSingleNode("editor/name").InnerText
lrsslabel.Text = x

It works. However when I replace last 2 lines as follow it doesn't work:
lrsslabel.Text = news.SelectSingleNode("editor/name").InnerText

Why? How to solve it without needing to declare the x variable?

Thanks,
Miguel

Nov 19 '05 #4

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

Similar topics

32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
2
by: Dan Schumm | last post by:
I'm relatively new to regular expressions and was looking for some help on a problem that I need to solve. Basically, given an HTML string, I need to highlight certain words within the text of the...
53
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
39
by: sucaba.r | last post by:
I don't know if this is a unique problem, or I'm going about it the wrong way. I currently connect to one of our SQL servers via a priviliged account (by using RUNAS). Works with no problem. I...
7
by: Sky | last post by:
I have been looking for a more powerful version of GetType(string) that will find the Type no matter what, and will work even if only supplied "{TypeName}", not the full "{TypeName},{AssemblyName}"...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.