BltInFunc-XMLENCODE.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="XMLENCODE">
  5. <title>XMLENCODE</title>
  6. <para><emphasis role="bold">XMLENCODE<indexterm>
  7. <primary>XMLENCODE</primary>
  8. </indexterm><indexterm>
  9. <primary>XMLENCODE Function</primary>
  10. </indexterm>(</emphasis><emphasis> xml </emphasis><emphasis
  11. role="bold">[</emphasis><emphasis>,</emphasis><emphasis role="bold">
  12. ALL<indexterm>
  13. <primary>ALL</primary>
  14. </indexterm> ] )</emphasis></para>
  15. <para><informaltable colsep="1" frame="all" rowsep="1">
  16. <tgroup cols="2">
  17. <colspec colwidth="77.05pt" />
  18. <colspec />
  19. <tbody>
  20. <row>
  21. <entry><emphasis>xml</emphasis></entry>
  22. <entry>The XML to encode.</entry>
  23. </row>
  24. <row>
  25. <entry><emphasis role="bold">ALL</emphasis></entry>
  26. <entry>Optional. Specifies including new line characters in the
  27. encoding so the text can be used in attribute definitions.</entry>
  28. </row>
  29. <row>
  30. <entry>Return:</entry>
  31. <entry>XMLENCODE returns a single value.</entry>
  32. </row>
  33. </tbody>
  34. </tgroup>
  35. </informaltable></para>
  36. <para>The <emphasis role="bold">XMLENCODE</emphasis> function encodes
  37. special characters in an XML string (for example, &lt; is converted to
  38. &amp;lt) allowing you to use the CSV option on OUTPUT to produce more
  39. complex XML files than are possible by using the XML option.</para>
  40. <para>Example:</para>
  41. <programlisting> d := XMLENCODE('&lt;xml version 1&gt;&lt;tag&gt;data&lt;/tag&gt;');
  42. e := XMLDECODE(d);
  43. </programlisting>
  44. <para>See Also: <link linkend="XMLDECODE">XMLDECODE</link></para>
  45. </sect1>