XPath working with empty nodes

dapaspine

New Member
If I got this XML(first tag is empty) \[code\]<messages> <message> <name>Kiro</name> <acc></acc> <date>20120506</date> <template>TMPL_ACC_UP</template> </message> <message> <name>Third</name> <acc>555</acc> <date>20120507</date> <template>TMPL_ACC_UP</template> </message> </messages>\[/code\]Now i take all accpunts with this XPath expression: "//message/acc/text()", and get node list of 1(empty nodes not included). I want to get empty string for the empty tag ['555','']. How I can achieve this? Thanks!
 
Back
Top