Module: sip-router
Branch: master
Commit: 6e729562274f7b5ec5230a7df2764f36ddb0f39f
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6e72956…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jun 11 21:02:47 2009 +0300
presence_xml: implementation of pv $xml(...)
- handling of xml docs using xpath
- $xml(name=>doc) - get/set an xml doc under 'name'
- $xml(name=>xpath:xpath-expression) - evaluate/update xpath extension
- example:
$xml(x=>doc) = '<?xml version="1.0"
encoding="UTF-8"?><a><b>test</b></a>';
xlog("content of node b: $xml(a=>xpath:/a/b/text())\n");
$xml(a=>xpath:/a/b) = "1234";
- TODO list:
- extend presence modules to work also with xml documents from $xml() PV
- support to set node content to an xml tree
- usage:
- do routing decisions based on content of xml documents comming
with SIP messages (such as PUBLISH)
- update xml document content
- evaluate XPath-allowed expressions and functions, see:
http://www.w3.org/TR/xpath
---
modules_k/presence_xml/pv_xml.c | 463 +++++++++++++++++++++++++++++++++++++++
modules_k/presence_xml/pv_xml.h | 35 +++
2 files changed, 498 insertions(+), 0 deletions(-)
Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=6e7…