| re: SelectSingleNode..Not Working..???
><?xml version="1.0" encoding="utf-8"?>[color=blue]
><RoleTables xmlns="http://tempuri.org/UserPass.xsd">
> <Table>
> <username>Arun</username>
> <password>jgEEnsYs+ZY=</password>
> <Email>arun@yahoo.com</Email>
> </Table>
> <Table>
> <username>sweta</username>
> <password>A/JvqRbKGes=</password>
> <Email>sita@ere.com</Email>
> </Table>
></RoleTables>
>
>XmlNode table = root.SelectSingleNode("descendant::Table[ @user='Arun' ]");
>
>But table always points to null...i.e. I am not able to get to that
>particular users node.[/color]
Well, the <Table> tag contains a tag called <username> - so maybe you
need to select on that, not on "user" (which doesn't exist). Also, I
think the @user would refer to an attribute "user" of the <Table> tag
- which you don't have - you mostly likely need to use this instead:
XmlNode table =
root.SelectSingleNode("descendant::Table[username='Arun' ]");
Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch |