mirror of https://github.com/sipwise/sems.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
14 years ago | |
|---|---|---|
| .. | ||
| Readme.mod_aws.txt | 16 years ago | |
| Readme.mod_conference.txt | 16 years ago | |
| Readme.mod_curl.txt | 14 years ago | |
| Readme.mod_dlg.txt | 14 years ago | |
| Readme.mod_groups.txt | 16 years ago | |
| Readme.mod_monitoring.txt | 16 years ago | |
| Readme.mod_mysql.txt | 14 years ago | |
| Readme.mod_py.txt | 16 years ago | |
| Readme.mod_regex.txt | 15 years ago | |
| Readme.mod_subscription.txt | 14 years ago | |
| Readme.mod_sys.txt | 16 years ago | |
| Readme.mod_uri.txt | 16 years ago | |
| Readme.mod_utils.txt | 16 years ago | |
| Readme.mod_xml.txt | 14 years ago | |
Readme.mod_xml.txt
mod_xml - generic XML functions
This module implements generic XML handling functions. XML objects are created in
objects, which must be tracked or released by the script using trackObject/freeObject.
Then functions can be executed on the XML objects, e.g. XPath evaluation.
mod_xml must be preloaded to initialize libxml2.
xml.parse("<xml_obj/>", dst_objname)
parse XML string into object referenced with dst_objname.
Example: xml.parse($myxml, xml_obj)
xml.parseSIPMsgBody(msg_body_object, dst_objname)
Parse a SIP message body object into an XML object.
Example: xml.parseSIPMsgBody("SipSubscriptionBody", "substatus")
xml.evalXPath(xpath_expr, xml_object)
Evaluate XPath expression on XML object.
Namespaces are registered in $xml_object.ns variable.
The result is saved to xml_object.xpath object.
Example:
set($substatus.ns="a=urn:ietf:params:xml:ns:reginfo")
xml.evalXPath("//a:contact[@state='active']", "substatus");
xml.XPathResultCount($cntvar=xpath_object)
Save result count of XPath result in xpath_object into counter variable $cntvar.
Example:
xml.XPathResultCount($rescnt="substatus.xpath");
xml.setLoglevel(level)
set libxml2 error logging level. Default: error
Valid: error, warn, info, debug