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.
In VB's object browser, its description of this propery
is: property get the strongly typed value of the node. For an
element Node, it returns a variant datatype of the contents of
the Node. If you're working with an attribute Node, you will
only get the value of attribute, which does not return much
value. (See nodeValue for working with attribute Nodes.)
If you have used a Schema in your XML, which does not have a
datatype specified for
the element in the Schema, a string value datatype is the default
datatype returned. Otherwise, it returns the data in the
specified datatype value. This is the main strength of this
property.
When working with an element Node, you could also use the Text
property to get the value of a Node. It's a matter of
preference.
Example
You cannot use the nodeTypedValue property to set the value of
a Node, as it will return a runtime error. You need to use the
text property to do this.
In the following example, after loading our DOMDocument, we
want to get the value of the first child's value of the first
element (firstChild) of the root element (documentElement), using
the nodeTypedValue property:
¬ From the first child of the root Node, get the first
child of that element.
¬ This returns "Mark Wilson" from our main XML
example.
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!