Based on a character offset into an XML document, how can I find the containing node of that character position?
For example consider the XML: