473,839 Members | 1,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HasChildNodes does not work properly

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

? nChild.HasChild Nodes
True

TEXT IS NOT A NODE!!!

Please explain.

TIA -
Brian
Nov 20 '05 #1
3 1528
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.goo gle.com... ? nChild.OuterXml
"<LocaleId>{761 35713-CB5C-4116-925F-1E69254A775B}</LocaleId>"

? nChild.HasChild Nodes
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 "NextSiblingEle ment"?

Thanks,
Brian
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message news:<Oo******* *******@TK2MSFT NGP11.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.goo gle.com...
? nChild.OuterXml
"<LocaleId>{761 35713-CB5C-4116-925F-1E69254A775B}</LocaleId>"

? nChild.HasChild Nodes
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
1095
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 that were empty are NOT overwritten. So, the code is as follows: <code>
1
3479
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 doing the following steps: 1. add a web setup project called "testaddr". 2. in file system window, select Web Application folder. 3. in the left pane of the file system window, right-click web application, point to add, and then click output...
1
4947
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., <Root> <mysection>
0
1717
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., <Root> <mysection>
14
4867
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 can be done using the designer but I intentionally don't want to use that. The one reason is that you cannot change the code generated by the designer. The other could be that you have more free hand and control to design your GUI. 2....
89
6096
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 used." Could anybody tell me why gets() function is dangerous?? Thank you very much. Cuthbert
9
2649
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 consider. My question is if i am using timer in my windows service, is there any place where interval related information like interval set used by my
7
3102
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 value="chk-4">CheckBox 4 </td> </tr> </td>
1
3406
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
9855
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9697
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10650
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10295
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7830
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3136
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.