79701409

Date: 2025-07-14 23:05:07
Score: 0.5
Natty:
Report link

Xpath query was incorrect. Need to add a "." to the Xpath query to make it start at the selected node. Second query should be:

auto path_node = name_node.parent().select_node(".//coordinates");

The value that was being returned was the first occurrence of a coordinates node in the entire document, which just so happened to match.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: SeedlessKiwi