No, it should not be undeleted, because it doesn't answer the original question. The question clearly asks (highlighting mine):
I have a node handed to my function, from somewhere deep inside an XML
document, and I want to select all descendant elements of this node
that have a specific name [...]
The deleted answer that you seem to consider to be "the best answer" starts off with (again, highlighting mine):
I was looking for something similar, but wanted only the values of a
certain attribute of all descendent nodes.
In XML, elements and attributes are two different node types, and as such the deleted answer does not answer the question.
As you argue in your comment:
Shouldn't the answer stand by itself?
Indeed. And this answer does not. It was correctly flagged by review and deleted by a moderator. You even admit as much in your question as you suggest that review might have gone differently if the other answer had been shown alongside the flagged one, indicating the need for context.
As for your reasoning that an accepted answer, with 61 upvotes and no downvotes, and a comment from the OP starting with "Perfect, that's exactly what I was looking for", somehow doesn't provide any indication that the proposed solution actually works... What more do you need? Insisting that all working answers are actually followed up with additional answers confirming that they work, is completely at odds with the intended usage of Stack Overflow.