The $Text Data
Field
When you bind
data using the XML DSO, an automatic field called "$Text" is created. It
contains the items in that record, concatenated. The following example
demonstrates the $Text data field.
<HTML><HEAD></HEAD><TITLE></TITLE>
<BODY>
<XML ID="xmlParts">
<?xml version="1.0" ?>
<parts>
<part>
<partnumber>A1000</partnumber>
<description>Flat washer</description>
<quantity>1000</quantity>
</part>
<part>
<partnumber>S2300</partnumber>
<description>Machine screw</description>
<quantity>1000</quantity>
</part>
<part>
<partnumber>M2400</partnumber>
<description>Nail</description>
<quantity>500</quantity>
</part>
</parts>
</XML>
<table datasrc=#xmlParts>
<tr>
<td><div datafld="partnumber"></div></td>
<td><div datafld="$Text"></div></td>
</tr>
</table>
</BODY>
</HTML>
In this
example, the table will consist of a column of part numbers (where datafld is equal to "partnumber") and a column containing the part
number, description, and quantity concatenated (where datafld is
equal to "$Text"). For example, the first row of the partnumber column will
contain "S2300", while the second row of the $Text column will contain
"S2300 Machine screw 1000". Note that the $Text column contains the part
number. |