المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Test XmlReader Node for a SubTree



C# Programming
04-08-2009, 11:00 PM
What's the quickest way to test/check the current node when doing a loop whether that node has it's own subtree of nodes? Or rather that it just has a value.
like:
while (xr.Read())
{
//xr.checkforsubtree
If I do a:
xr.ReadElementString(); - then it advances the current node as well
I want some kind of if statement to check it before hand.
if xr.hasvalue does not work
}