Hi,
I'm having troubles fetching an xpath from an xml document using
presence_xml, so I probably do something wrong (using kamailio 3.0.x):
$xml(x=>doc) = '<?xml version="1.0"
encoding="utf-8"?><presence
xmlns="urn:ietf:params:xml:ns:pidf"
entity="sip:test@mydomain.com"><tuple
id="86ae65b7-42de-4399-b635-295caad13aac"><status><basic>none</basic></status></tuple></presence>';
xlog("L_INFO", "all=$xml(x=>doc)\n");
-> prints the whole document, which is ok
xlog("L_INFO", "tmp1=$xml(x=>xpath:/)\n");
-> also prints the whole document (including the xml tag in the
beginning, not sure if this is ok)
xlog("L_INFO", "tmp2=$xml(x=>xpath:/presence)\n");
-> prints an empty string
How is this actually supposed to work? What I'd like to do in the end is
extracting for example the "none" from the "basic"-tag by specifying
"xpath:/presence/tuple/status/basic", which also returns an empty string
now, also when appended with "/text()".
Thanks a lot,
Andreas