12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
- <sect1 id="FROMXML">
- <title>FROMXML</title>
- <para><emphasis role="bold">FROMXML<indexterm>
- <primary>FROMXML</primary>
- </indexterm><indexterm>
- <primary>FROMXML function</primary>
- </indexterm>(</emphasis><emphasis> record, xmlstring </emphasis><emphasis
- role="bold">)</emphasis></para>
- <para><informaltable colsep="1" frame="all" rowsep="1">
- <tgroup cols="2">
- <colspec colwidth="77.95pt" />
- <tbody>
- <row>
- <entry><emphasis>record</emphasis></entry>
- <entry>The RECORD structure to produce. Each field must specify
- the XPATH to the data in the <emphasis>xmlstring</emphasis> that
- it should hold.</entry>
- </row>
- <row>
- <entry><emphasis>xmlstring</emphasis></entry>
- <entry>A string containing the XML to convert.</entry>
- </row>
- <row>
- <entry>Return:</entry>
- <entry>FROMXML returns a single row (record).</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable></para>
- <para>The <emphasis role="bold">FROMXML </emphasis>function returns a single
- row (record) in the <emphasis>record</emphasis> format from the specified
- <emphasis>xmlstring</emphasis>. This may be used anywhere a single row can
- be used (similar to the ROW function).</para>
- <para>Example:</para>
- <programlisting>namesRec := RECORD
- UNSIGNED2 EmployeeID{xpath('EmpID')};
- STRING10 Firstname{xpath('FName')};
- STRING10 Lastname{xpath('LName')};
- END;
- x := '<Row><FName>George</FName><LName>Jetson</LName><EmpID>42</EmpID></Row>';
- rec := FROMXML(namesRec,x);
- OUTPUT(rec);</programlisting>
- <para>See Also: <link linkend="ROW">ROW</link>, <link linkend="TOXML">TOXML</link></para>
- </sect1>
|