Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
931
NODE_TEXT
Has an interface type of:
XML DOM Text
Can have the following children types:
None
This nodeType specifies a text Node in the XML file. A text
Node can appear as the child Node of Attribute, DocumentFragment,
Element, and EntityReference Nodes. It never has any child
Nodes.
In the following XML example, the highlighted text will be the
value in a text Node:
If you are working with an ElementNode type, then you actually
don't need to iterate down to its child Node to get the text
of the element. You can just use the nodeTypeValue property of
the element Node. This will give you its text value, whether it
contains a CDATA section, entities, or whatever.
However, there are a few tricks. The next Node type we will
explain is the CDATA section. If your Node happens to be of this
type, it will be represented as a CDATA section Node and not a
text Node, even though it looks like a text Node. So, if you are
looking for the text Node of an element Node, don't forget to
look for the CDATA section Node as well.
This manuscript is an abridged version of a chapter from the
Manning
Publications book XMLProgramming with VB and ASP. This chapter
looks at the Microsoft DOM objects. NOTE: Most images have been
removed to increase speed and many of the code comments have also
been removed for presentation. Please purchase the book to enjoy
the full experience of all the chapters with images and code
comments!