473,398 Members | 2,393 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,398 software developers and data experts.

HasChildNodes does not work properly

? nChild.OuterXml
"<LocaleId>{76135713-CB5C-4116-925F-1E69254A775B}</LocaleId>"

? nChild.HasChildNodes
True

TEXT IS NOT A NODE!!!

Please explain.

TIA -
Brian
Nov 20 '05 #1
3 1509
Brian,
TEXT IS NOT A NODE!!! Actually Text IS a type of Node! May I ask why you think it is not?

Check the hierarchy of the XmlText class, it inherits from XmlNode like all
the other nodes.
http://msdn.microsoft.com/library/de...ClassTopic.asp

Check the XmlNodeType enumeration, Text is listed as a node type.
http://msdn.microsoft.com/library/de...ClassTopic.asp

Hope this helps
Jay

"Brian" <bo***@vafb.com> wrote in message
news:d2**************************@posting.google.c om... ? nChild.OuterXml
"<LocaleId>{76135713-CB5C-4116-925F-1E69254A775B}</LocaleId>"

? nChild.HasChildNodes
True

TEXT IS NOT A NODE!!!

Please explain.

TIA -
Brian

Nov 20 '05 #2
Because if you traverse the tree using FIRSTCHILD and NEXTSIBLING, you
do not get the text type nodes, only the element type nodes.

Make sense? If a Node can be text, attribute, etc. (which I know from
my XSLT coding) then why does NEXTSIBLING jump to the next text node?
It should be called "NextSiblingElement"?

Thanks,
Brian
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:<Oo**************@TK2MSFTNGP11.phx.gbl>...
Brian,
TEXT IS NOT A NODE!!!

Actually Text IS a type of Node! May I ask why you think it is not?

Check the hierarchy of the XmlText class, it inherits from XmlNode like all
the other nodes.
http://msdn.microsoft.com/library/de...ClassTopic.asp

Check the XmlNodeType enumeration, Text is listed as a node type.
http://msdn.microsoft.com/library/de...ClassTopic.asp

Hope this helps
Jay

"Brian" <bo***@vafb.com> wrote in message
news:d2**************************@posting.google.c om...
? nChild.OuterXml
"<LocaleId>{76135713-CB5C-4116-925F-1E69254A775B}</LocaleId>"

? nChild.HasChildNodes
True

TEXT IS NOT A NODE!!!

Please explain.

TIA -
Brian

Nov 20 '05 #3
Cor
Hi Brian

In addition to Jay B.

Have a look at "innertext" and "innerHtml"

I hope this helps

Cor
Nov 20 '05 #4

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

Similar topics

0
by: chris yoker via DotNetMonster.com | last post by:
hiya, I previously obtained code that enabled me the replace a node and its innerText.The code relied on the node that was to be replaced having ?childNodes? However, it seems that the nodes...
1
by: Wendy Elizabeth | last post by:
Can you give me some suggestions of why the xml web service is not working? I have an xml web service that works in my visual studio. net 1.1 environment. I setup this project up for deployment...
1
by: RJN | last post by:
Hi I have to read an xml and add the node elements into a hashtable with nodename as key and nodetext as value. If the selected node has childnodes, then value should go as an array. for eg.,...
0
by: RJN | last post by:
Hi I have to read an xml and add the node elements into a hashtable with nodename as key and nodetext as value. If the selected node has childnodes, then value should go as an array. for eg.,...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
89
by: Cuthbert | last post by:
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be...
9
by: archana | last post by:
Hi all, I want to know about interval of timer. I am using timer in windows service.I head somewhere that when i set interval property of timer while setting interval, restart time of Pc is...
7
by: connectwithme | last post by:
I am using IE 6.x & Mozilla 2.x This is the HTML code <td id="td2"> <tr id="td3"> <td id="td4"> Some Test TEXT </td> <td id="td5"> <input type=checkbox...
1
by: =?Utf-8?B?QmFydCBTdGV1cg==?= | last post by:
I have the following issue. I'm trying to read to following XML doc. <Main> <Submain> <SubField1/> <SubField2/> </Submain> <Field1/> <Field2>AnyTextValue</Field2> </Main>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.