functions.xml 871 B

1234567891011121314151617181920212223242526272829
  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. <section id="textopsx.pvs" xmlns:xi="http://www.w3.org/2001/XInclude">
  5. <title>Pseudo-Variables</title>
  6. <section id="pv-xml">
  7. <title>
  8. <function moreinfo="none">$xml(name=>spec)</function>
  9. </title>
  10. <para>
  11. Pseudo-variable for XML document operations using xpath syntax. For
  12. more see the Pseudo-Variables Cookbook.
  13. </para>
  14. <example>
  15. <title><function>xml</function> usage</title>
  16. <programlisting format="linespecific">
  17. ...
  18. $xml(x=&gt;doc)
  19. = '&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;a&gt;&lt;b&gt;test&lt;/b&gt;&lt;/a&gt;';
  20. xlog("content of node b: $xml(x=&gt;xpath:/a/b/text())\n");
  21. $xml(x=&gt;xpath:/a/b) = "1234";
  22. ...
  23. </programlisting>
  24. </example>
  25. </section>
  26. </section>