Correctly formatting XML data for fields and zones

You can put XML data into a text column in an Adaptive Server database, and then create a text index on that data.This requires using select statements with special syntax, which includes the Verity operators. In the following select statement, for example, <in> is a Verity operator.

select t1.id 
from 
	ti_address_tbl t1, 
	address_tbl t2 
where 
	t1.id=t2.id and 
	t1.index_any ='USA <in> address'

Sybase supports indexing XML data into text indexes with fields or zones when the XML document is well-formed and has the following format:

<address>
<street>123 Main St.</street>
<city>Anywhere</city>
<state>CA</state>
<country>USA</country>
</address>

This format inserts the text "123 Main St. Anywhere CA USA" into the address zone, "123 Main St." into the street zone, and so forth.