I'm curious about the purpose of Microsoft's extension to the DOM: InnerText. Take a look at the following code:
Dim a As Xml.XmlDocument = New Xml.XmlDocument
The message box will display:
Does anyone know how this might be useful? If it included a space between "John" and "Doe", there might be some use for it (e.g. tokenizing for search). But when it's concatenated this way, I'm not sure what use it is.
Also, according to http://msdn2.microsoft.com/en-us/library/system.xml.xmlnode.innertext(VS.80).aspx
, this method "gets or sets the concatenated values of the node and all its child nodes." As the example shows, it only got the values of the elements and skipped the attributes. Both are "nodes." Is there a reason why the attribute nodes were excluded from the result?