Browse code

modules: readme files regenerated - xmlops ... [skip ci]

Kamailio Dev authored on 10/02/2022 16:16:16
Showing 1 changed files
... ...
@@ -93,11 +93,28 @@ modparam("xmlops", "buf_size", 8192)
93 93
 3.2. xml_ns (str)
94 94
 
95 95
    Register xml namespace prefix. Parameter value must have the format:
96
-   'prefix=uri'.
96
+   'prefix=uri'. It can be set many times to cope with multiple namespaces
97
+   without prefix.
98
+
99
+   This is useful when it is needed to access XML documents that specify
100
+   xmlns without prefix, which is not XML-standard compliant, but it comes
101
+   with SIP SIMPLE presence bodies.
97 102
 
98 103
    Example 1.2. Set xml_ns parameter
99 104
 ...
100 105
 modparam("xmlops", "xml_ns", "rpid=urn:ietf:params:xml:ns:pidf:rpid")
106
+modparam("xmlops", "xml_ns", "pidf=urn:ietf:params:xml:ns:pidf")
107
+...
108
+$xml(x=>doc) = '<?xml version="1.0" encoding="utf-8"?>
109
+    <presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:test@mydomain.com"
110
+>
111
+        <tuple id="86ae65b7-42de-4399-b635-295caad13aac">
112
+            <status><basic>none</basic></status>
113
+        </tuple>
114
+    </presence>';
115
+
116
+xinfo("status: $xml(x=>xpath:/pidf:presence/pidf:tuple/pidf:status/pidf:basic)\n
117
+");
101 118
 ...
102 119
 
103 120
 4. Pseudo-Variables
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,118 @@
1
+XMLOPS Module
2
+
3
+Daniel-Constantin Mierla
4
+
5
+   asipto.com
6
+   <miconda@gmail.com>
7
+
8
+   Copyright © 2009 asipto.com
9
+     __________________________________________________________________
10
+
11
+   Table of Contents
12
+
13
+   1. Admin Guide
14
+
15
+        1. Overview
16
+        2. Dependencies
17
+
18
+              2.1. Kamailio Modules
19
+              2.2. External Libraries or Applications
20
+
21
+        3. Parameters
22
+
23
+              3.1. buf_size (integer)
24
+              3.2. xml_ns (str)
25
+
26
+        4. Pseudo-Variables
27
+
28
+              4.1. $xml(name=>spec)
29
+
30
+   List of Examples
31
+
32
+   1.1. Set buf_size parameter
33
+   1.2. Set xml_ns parameter
34
+   1.3. xml usage
35
+
36
+Chapter 1. Admin Guide
37
+
38
+   Table of Contents
39
+
40
+   1. Overview
41
+   2. Dependencies
42
+
43
+        2.1. Kamailio Modules
44
+        2.2. External Libraries or Applications
45
+
46
+   3. Parameters
47
+
48
+        3.1. buf_size (integer)
49
+        3.2. xml_ns (str)
50
+
51
+   4. Pseudo-Variables
52
+
53
+        4.1. $xml(name=>spec)
54
+
55
+1. Overview
56
+
57
+   This is a module implementing functions and pseudo-variables for XML
58
+   operations.
59
+
60
+2. Dependencies
61
+
62
+   2.1. Kamailio Modules
63
+   2.2. External Libraries or Applications
64
+
65
+2.1. Kamailio Modules
66
+
67
+   The following modules must be loaded before this module:
68
+     * none.
69
+
70
+2.2. External Libraries or Applications
71
+
72
+   The following libraries or applications must be installed before
73
+   running kamailio with this module loaded:
74
+     * libxml - for compilation from source, the development headers from
75
+       this library are needed as well.
76
+
77
+3. Parameters
78
+
79
+   3.1. buf_size (integer)
80
+   3.2. xml_ns (str)
81
+
82
+3.1. buf_size (integer)
83
+
84
+   Maximum size of the XML buffer.
85
+
86
+   Default value is 4096.
87
+
88
+   Example 1.1. Set buf_size parameter
89
+...
90
+modparam("xmlops", "buf_size", 8192)
91
+...
92
+
93
+3.2. xml_ns (str)
94
+
95
+   Register xml namespace prefix. Parameter value must have the format:
96
+   'prefix=uri'.
97
+
98
+   Example 1.2. Set xml_ns parameter
99
+...
100
+modparam("xmlops", "xml_ns", "rpid=urn:ietf:params:xml:ns:pidf:rpid")
101
+...
102
+
103
+4. Pseudo-Variables
104
+
105
+   4.1. $xml(name=>spec)
106
+
107
+4.1.  $xml(name=>spec)
108
+
109
+   Pseudo-variable for XML document operations using xpath syntax. For
110
+   more see the Pseudo-Variables Cookbook.
111
+
112
+   Example 1.3. xml usage
113
+...
114
+$xml(x=>doc)
115
+    = '<?xml version="1.0" encoding="UTF-8"?><a><b>test</b></a>';
116
+xlog("content of node b: $xml(x=>xpath:/a/b/text())\n");
117
+$xml(x=>xpath:/a/b) = "1234";
118
+...