My XML document looks like this
When I run XPATH query //collected_objects, I don’t get any nodeset selected. What am I doing wrong? I want to select the whole collected_objects node.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because your XML document has a XML namespace defined (
<oval_system_characteristics xmlns="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5") – you need to include that in your query!How you can do this depends on what system/programming language you’re using. In .NET / C#, you could do this something like this: