xmlops_admin.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  4. <chapter>
  5. <title>Admin Guide</title>
  6. <section id="xmlops.overview">
  7. <title>Overview</title>
  8. <para>
  9. This is a module implementing functions and pseudo-variables for
  10. XML operations.
  11. </para>
  12. </section>
  13. <section id="xmlops.deps">
  14. <title>Dependencies</title>
  15. <section>
  16. <title>Kamailio Modules</title>
  17. <para>
  18. The following modules must be loaded before this module:
  19. </para>
  20. <itemizedlist>
  21. <listitem>
  22. <para>
  23. <emphasis>none</emphasis>.
  24. </para>
  25. </listitem>
  26. </itemizedlist>
  27. </section>
  28. <section>
  29. <title>External Libraries or Applications</title>
  30. <para>
  31. The following libraries or applications must be installed before running
  32. kamailio with this module loaded:
  33. </para>
  34. <itemizedlist>
  35. <listitem>
  36. <para>
  37. <emphasis>libxml</emphasis> - for compilation from source, the
  38. development headers from this library are needed as well.
  39. </para>
  40. </listitem>
  41. </itemizedlist>
  42. </section>
  43. </section>
  44. <section id="xmlops.parameters" xmlns:xi="http://www.w3.org/2001/XInclude">
  45. <title>Parameters</title>
  46. <section id="xmlops.p.buf_size">
  47. <title><varname>buf_size</varname> (integer)</title>
  48. <para>
  49. Maximum size of the XML buffer.
  50. </para>
  51. <para>
  52. Default value is 4096.
  53. </para>
  54. <example>
  55. <title>Set <varname>buf_size</varname> parameter</title>
  56. <programlisting>
  57. ...
  58. modparam("xmlops", "buf_size", 8192)
  59. ...
  60. </programlisting>
  61. </example>
  62. </section>
  63. <section id="xmlops.p.xml_ns">
  64. <title><varname>xml_ns</varname> (str)</title>
  65. <para>
  66. Register xml namespace prefix. Parameter value must have the format:
  67. 'prefix=uri'.</para>
  68. <example>
  69. <title>Set <varname>xml_ns</varname> parameter</title>
  70. <programlisting format="linespecific">
  71. ...
  72. modparam("xmlops", "xml_ns", "rpid=urn:ietf:params:xml:ns:pidf:rpid")
  73. ...
  74. </programlisting>
  75. </example>
  76. </section>
  77. </section>
  78. <section id="xmlops.pvs">
  79. <title>Pseudo-Variables</title>
  80. <section>
  81. <title>
  82. <function moreinfo="none">$xml(name=>spec)</function>
  83. </title>
  84. <para>
  85. Pseudo-variable for XML document operations using xpath syntax. For
  86. more see the Pseudo-Variables Cookbook.
  87. </para>
  88. <example>
  89. <title><function>xml</function> usage</title>
  90. <programlisting format="linespecific">
  91. ...
  92. $xml(x=&gt;doc)
  93. = '&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;a&gt;&lt;b&gt;test&lt;/b&gt;&lt;/a&gt;';
  94. xlog("content of node b: $xml(x=&gt;xpath:/a/b/text())\n");
  95. $xml(x=&gt;xpath:/a/b) = "1234";
  96. ...
  97. </programlisting>
  98. </example>
  99. </section>
  100. </section>
  101. </chapter>