Table of Contents
List of Examples
buf_size
parameterxml_ns
parameterxml
usageTable of Contents
Maximum size of the XML buffer.
Default value is 4096.
Register xml namespace prefix. Parameter value must have the format: 'prefix=uri'. It can be set many times to cope with multiple namespaces without prefix.
This is useful when it is needed to access XML documents that specify xmlns without prefix, which is not XML-standard compliant, but it comes with SIP SIMPLE presence bodies.
Example 1.2. Set xml_ns
parameter
... modparam("xmlops", "xml_ns", "rpid=urn:ietf:params:xml:ns:pidf:rpid") modparam("xmlops", "xml_ns", "pidf=urn:ietf:params:xml:ns:pidf") ... $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>'; xinfo("status: $xml(x=>xpath:/pidf:presence/pidf:tuple/pidf:status/pidf:basic)\n"); ...
Pseudo-variable for XML document operations using xpath syntax. For more see the Pseudo-Variables Cookbook.
Example 1.3. xml
usage
... $xml(x=>doc) = '<?xml version="1.0" encoding="UTF-8"?><a><b>test</b></a>'; xlog("content of node b: $xml(x=>xpath:/a/b/text())\n"); $xml(x=>xpath:/a/b) = "1234"; ...