Net Search Extender does not attempt to detect the code page of an XML document. The CCSID specified during CREATE INDEX, or if not specified, the DB2 code page.
Here is an example of an XML document:
<?xml version="1.0"?> <purchaseOrder orderDate="2001-01-20"> <shipAddress countryCode="US"> [1] <name>Alice Smith</name> [2] <street>123 Maple Street</street> <city>Mill Hill</city> <state>CA</state> <zip>90999</zip> </shipAddress> <item partNo="123" quantity="1"> <name>S&B Lawnmower Type ABC-x</name> [3] <price>239.90</price> <shipDate>2001-01-25</shipDate> </item> <item partNo="987" quantity="1"> [3] <name>Multifunction Rake ZYX</name> <price>69.90</price> <shipDate>2001-01-24</shipDate> </item> </purchaseOrder>
Here is an example of an XML document model:
<?xml version="1.0"?> <XMLModel> <XMLFieldDefinition [1] name="addresses" locator="/purchaseOrder/shipAddress" exclude="no" /> <XMLFieldDefinition [2] name="customerName" locator="//shipAddress/name" exclude="yes"/> <XMLAttributeDefinition [3] name="partNumber" type="NUMBER" locator="/purchaseOrder//item/@partNo" /> </XMLModel>
The first line, <?xml version="1.0"?>, specifies that the model is written using XML. Each field is defined within a XMLFieldDefinition or XMLAttributeDefinition tag, which contains element parameters.
Note that all the text field definitions must be contained within the <XMLModel> tag. For restrictions, see Limitations for text fields and document attributes.