You can index XML attributes in the same way that you index ordinary fields. However, you must refer to them using the following format for the IDOL Content component to be able to read them:
*/tagName/_ATTR_attributeName
where:
tagName
|
is the name of the tag. |
attributeName
|
is the name of the attribute that you want the IDOL Content component to read. |
For example:
<FARM ANIMAL="sheep" COLOR="white"> Farmer Joe </FARM>
To identify the ANIMAL
attribute to Content, refer to it as
*/FARM/_ATTR_ANIMAL
To identify the COLOR
attribute to Content, refer to it as
*/FARM/_ATTR_COLOR
Example:
<ROOM Name="The Kitchen"> <FURNITURE>Table</FURNITURE > <ITEM Type="China">Dish</ITEM> </ROOM>
To identify the Name
attribute to Content, refer to it as
*/ROOM/_ATTR_Name
To identify the Type
attribute to Content, refer to it as
*/ITEM/_ATTR_Type
Open the IDOL Content component configuration file in a text editor.
List an indexing process in the [FieldProcessing]
section.
For example:
[FieldProcessing] 0=MyFirstProcess 2=IndexingFields
Create a section for the indexing process, in which you create a property for the process (you define a property later, by using one or more applicable configuration parameters). Identify the fields that you want to associate with the processes.
NOTE: The property that you create must not have the same name as the process.
For example:
[MyFirstProcess] Property=MyFirstProperty PropertyFieldCSVs=*/MyField,*/MySecondField PropertyMatch=*myString* [IndexingFields] Property=IndexFields PropertyFieldCSVs=*/FIELD/_ATTR_ANIMAL,*/FIELD/_ATTR_COLOR,*/ROOM/_ATTR_Name,*/ITEM/_ATTR_Type
Create a section for your indexing property in which you set the Index
parameter to True
.
For example:
[MyFirstProperty] HiddenType=True [IndexFields] Index=True
Save and close the configuration file.
Restart the IDOL Content component for your changes to take effect.
|