Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











PROPERTY:  Object::nodeValue

Object  Attr   CDATASection   CharacterData   Comment   Document   DocumentFragment   DocumentType   Entity   EntityReference   Node   Notation   ProcessingInstruction   Text
 
Object.nodeValue

The nodeValue property contains the value of the node, depending on type. The values returned by each node type are detailed below.

The following example uses the 'names.xml' file and obtains the node values of the last child node of the document's root node (the last 'name' tag), and that node's first child node (the text itself).

XML:
<names>
   <name>Alice</name>
   <name>Bert</name>
   <name>Charlie</name>
   <name>Diane</name>
   <name>Eric</name>
</names>

Code (VBScript):
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("names.xml")

Set objNode = objXMLDoc.documentElement.lastChild
document.write(objNode.nodeValue)
Set objNode = objNode.firstChild
document.write("<br>" & objNode.nodeValue)

Output:
null
Eric



 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information