Xpath – selecting element by attribute value
Using the sample data below, I wanted to get all the Link node that have LinkID = 13 (not the Junk node). Sample data <whatever> <Links> <Link LinkID='13' /> <Junk LinkID='13' /> <Link LinkID='1' /> <Link LinkID='13' /> </Links> </whatever> What fails are these: //*[local-name()=’Link’]/*[@LinkID=’13’] (XPath returned 0 items) //*[local-name()=’Links’]/[local-name()=’Links’ and @LinkID=’13’] ( Unexpected token […]