![]() ![]() |
Recordset to XML
|
|
The XML produced by the Server Behavior will have the following structure:
<recordset total="1000">
<record>
<field1>some value</field1>
<field2>some value</field2>
</record>
<record>
<field1>some value</field1>
<field2>some value</field2>
</record>
</recordset>
<recordset> is the root node of the generated XML (attribute "total" indicates the total number of records in the Recordset).
It contains <record> nodes which represent the records.
Each <record> node contains record's field nodes.
The name of each field node will be the same as the name of the corresponding Recordset field while the node text will be the value of that field.
For example, if your Recordset has a field USER_ID and one of the values is "10" that value will be represented in the XML by a field node structured as follows:
<USER_ID>10</USER_ID>
If the recordset is empty (contains no records) output will contain only root element - <recordset>:
<recordset total="0">
</recordset>
| EMPLOYEE_ID | First Name | Last Name | Hourly Rate | Address | Department |
| 1 | Allan | Doe | $70/hr | #10 44 St, WorkCity CA | 44 |
| 4 | Frank | Doe | $40/hr | #22 5th Ave, WorkCity CA | 22 |
| 2 | Jane | Doe | $30/hr | #12 5th Ave. WorkCity CA | 44 |
| 6 | John | Doe | $55/hr | #22 5th Ave, WorkCity CA | 22 |
| 7 | Kevin | Doe | $40/hr | #2 44th St, WorkCity CA | 22 |
| 3 | Robert | Doe | $55/hr | #2 34th St, WorkCity CA | 44 |
| 5 | Tanya | Doe | $40/hr | #21 7th Ave, WorkCity CA | 22 |
Copyright © 1999-2012 Alex July
Linecraft Studio