[PATCH v2 1/3] util/xml: fix extraction of XML context