How to pass query string into doc.SelectSingleNode
|
XMLGeneral XML discussions.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Life might be simpler for you if you split that one line into a couple of lines. This way you can check what is in the xpath variable by debugging the code - if this isn't what you want then you can change the line ot get it to work.
You include the '@' in your xPath - if this is because RefId is an attribute then it should be '@RefId'. If you're just getting it confused with the C# string literal character then you don't need it.