File: xmlops_admin.xml

package info (click to toggle)
kamailio 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 56,100 kB
  • sloc: ansic: 552,832; xml: 166,484; sh: 8,659; makefile: 7,676; sql: 6,235; perl: 3,487; yacc: 3,428; python: 1,457; cpp: 1,219; php: 1,047; java: 449; pascal: 194; cs: 40; awk: 27
file content (106 lines) | stat: -rw-r--r-- 2,713 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<chapter>
	<title>Admin Guide</title>
    <section id="xmlops.overview">
	<title>Overview</title>
	<para>
		This is a module implementing functions and pseudo-variables for
		XML operations.
	</para>
    </section>
	<section id="xmlops.deps">
	<title>Dependencies</title>
		<section>
		<title>Kamailio Modules</title>
			<para>
			The following modules must be loaded before this module:
			</para>
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>none</emphasis>.
			</para>
			</listitem>
			</itemizedlist>
		</section>
		<section>
		<title>External Libraries or Applications</title>
			<para>
			The following libraries or applications must be installed before running
			kamailio with this module loaded:
			</para>
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>libxml</emphasis> - for compilation from source, the 
				development headers from this library are needed as well.
			</para>
			</listitem>
			</itemizedlist>
		</section>
    </section>

<section id="xmlops.parameters" xmlns:xi="http://www.w3.org/2001/XInclude">
    <title>Parameters</title>

    <section id="xmlops.p.buf_size">
	<title><varname>buf_size</varname> (integer)</title>
	<para>
	    Maximum size of the XML buffer.
	</para>
	<para>
	    Default value is 4096.
	</para>
	<example>
	    <title>Set <varname>buf_size</varname> parameter</title>
	    <programlisting>
...
modparam("xmlops", "buf_size", 8192)
...
	    </programlisting>
	</example>
    </section>

	<section id="xmlops.p.xml_ns">
		<title><varname>xml_ns</varname> (str)</title>
		<para>
		Register xml namespace prefix. Parameter value must have the format:
		'prefix=uri'.</para>
		<example>
		<title>Set <varname>xml_ns</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("xmlops", "xml_ns", "rpid=urn:ietf:params:xml:ns:pidf:rpid")
...
</programlisting>
		</example>
	</section>
</section>

<section id="xmlops.pvs">
    <title>Pseudo-Variables</title>
	<section>
		<title>
		<function moreinfo="none">$xml(name=>spec)</function>
		</title>
		<para>
		Pseudo-variable for XML document operations using xpath syntax. For
		more see the Pseudo-Variables Cookbook.
		</para>
		<example>
		<title><function>xml</function> usage</title>
		<programlisting format="linespecific">
...
$xml(x=&gt;doc)
    = '&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;a&gt;&lt;b&gt;test&lt;/b&gt;&lt;/a&gt;';
xlog("content of node b: $xml(x=&gt;xpath:/a/b/text())\n");
$xml(x=&gt;xpath:/a/b) = "1234";
...
</programlisting>
		</example>
	</section>
</section>
</chapter>