"span" XPath means "immediate child nodes with name span
". Since immediate child is root
you get nothing.
You want either "//span"
(all spans anywhere in the tree starting from root) or "/root/span"
("root" at root, than its "span" children).