This function converts a table array into Xml.
SppConvertTabletoXml([Table Array])
Where:
Table Array is the array (such as the data in a simple table or the result of a QueryDataValues function) to be converted to a HTML table.
| Rule | Meaning |
|---|---|
| SppConvertTableToXML(DwLookupOfficeSupplies) | Will convert the table Office Supplies into XML. |
| SppConvertTableToXML({"Item","Price","Quantity";"HB Pencil","0.60","3"}) | Will convert the given array into XML. |
The following are escaping characters and, if they exist in the table array, will be converted in the result:
| Character | Replaced With |
|---|---|
| < | < |
| > | > |
| & | & |
The table OfficeSupplies contains the following data:
| Item | Price | Quantity |
|---|---|---|
| HB Pencil | 0.60 | 3 |
| 2B Pencil | 0.60 | 2 |
| Black Biro | 0.80 | 1 |
| Rubber | 1.50 | 1 |
| HB Pencil | 0.60 | 2 |
| Black Biro | 0.80 | 1 |
The table above will result in the following XML:
XMLversion and XMLencoding below will be replaced with the current version and encoding values.
For example:
XMLVersion will be 1.0
and
XMLencoding will be utf-16
<?xml version="XMLversion" encoding="XMLencoding"?>
<Table>
<Row>
<Column>Item</Column>
<Column>Price</Column>
<Column>Quantity</Column>
</Row>
<Row>
<Column>HB Pencil</Column>
<Column>0.60</Column>
<Column>3</Column>
</Row>
<Row>
<Column>2B Pencil</Column>
<Column>0.60</Column>
<Column>2</Column>
</Row>
<Row>
<Column>Black Biro</Column>
<Column>0.80</Column>
<Column>1</Column>
</Row>
<Row>
<Column>Rubber</Column>
<Column>1.50</Column>
<Column>1</Column>
</Row>
<Row>
<Column>HB Pencil</Column>
<Column>0.60</Column>
<Column>2</Column>
</Row>
<Row>
<Column>Black Biro</Column>
<Column>0.80</Column>
<Column>1</Column>
</Row>
</Table>