presence_xml: do not allocate memory before getting presence node