Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Thu, 26 Jun 2008 11:48:15 +0200,    group: microsoft.public.xml        back       


SelectNodes + XmlTextNode   
Is it possible to select all XmlTextNodes in a XmlDocument with 
SelectNodes() ?
How does such xpath look like? Don't want any XmlElements, only 
XmlTextNodes.
date: Thu, 26 Jun 2008 11:48:15 +0200   author:   Anonymous

Re: SelectNodes + XmlTextNode   
* Anonymous wrote in microsoft.public.xml:
>Is it possible to select all XmlTextNodes in a XmlDocument with 
>SelectNodes() ?
>How does such xpath look like? Don't want any XmlElements, only 
>XmlTextNodes. 

Use text() to address text nodes, http://www.w3.org/TR/xpath#node-tests
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
date: Thu, 26 Jun 2008 12:41:14 +0200   author:   Bjoern Hoehrmann

Re: SelectNodes + XmlTextNode   
Anonymous wrote:
> Is it possible to select all XmlTextNodes in a XmlDocument with 
> SelectNodes() ?
> How does such xpath look like? Don't want any XmlElements, only 
> XmlTextNodes.

//text() selects all text nodes in the XPath data model. If you operate 
on a DOM model you can run into slight differences between the XPath 
data model and the DOM model as DOM can have adjacent text nodes and 
distinguishes between normal text nodes and CDATA section nodes which 
the XPath data model does not. These are edge cases however and in lots 
of scenarios selecting //text() on a DOM model should give you the 
XmlTextNodes in the document.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Thu, 26 Jun 2008 13:47:51 +0200   author:   Martin Honnen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us