locked
Issue with XPath expression when doing looping RRS feed

  • Question

  • Hi  - I have below xpath expression shape. This works fine in the first loop, but while doing the second loop even this node value has data it is reading as empty.
    What am I doing wrong. Please advise I am stuck

    strXPath = System.String.Format("string(//*[local-name()='detail'][{0}]/*[local-name()='Description']/text())", intIndexCnt);


    RH

    Sunday, November 15, 2020 1:23 PM

All replies

  • Show an example of XML and maybe a larger fragment of your code, and consider using functions like SelectNodes instead of SelectSingleNode (then remove intIndexCnt). It is also possible to deal with XML namespaces.

    Sunday, November 15, 2020 2:12 PM