How can I find a xelement ( datapath / XPathSelectElement) RRS feed

  • Question

  • How can I get a string (from a XElement) which is suitable to retrieve a XElement again?
    With Treeview.Datapath I can get a string (e.g. /*[position()=1]/*[position()=1]/*[position()=2]/*[position()=1]/*[position()=3]/*[position()=3])

    with that I can select an element by XPathSelectElement, but XElement does not have a Datapath Property.

    What I mean is:

    string s = xElement.???;

    XElement xElement = xSomewhere.XPathSelectElement(s);

    Wednesday, December 3, 2008 4:16 PM