*
es********@esolutionsgroup.ca wrote in microsoft.public.dotnet.xml:
>Basically i want to do get the specific node that is empty but when i
try the following i get a null node even though I know there is a node
whose AN value is null. What am i doing wrong?
"/my:MF/my:SVY/my:INSP/my:INA/my:IA/my:AN[text()='']";
In the XPath data model, there exists no text node whose value is the
empty string, <foo></foois represented as having no children at all.
So text() evaluates to an empty node set, <http://www.w3.org/TR/xpath>:
If one object to be compared is a node-set and the other is a string,
then the comparison will be true if and only if there is a node in the
node-set such that the result of performing the comparison on the
string-value of the node and the other string is true.
which does not contain a corresponding node. Use [not(text())] instead.
--
Björn Höhrmann · mailto:bj****@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/