XML Data sources using relative XPATH with conditions can impact instance performance and ignore some records


Long XML files imported by a data source with XML format are unable to import some records when the XPATH field has been set with the following format:


For example, //kb_knowledge[kb_knowledge_base='<sys_id>'] or //incident[number='INC0010007']



Steps to Reproduce

  1. Run a data source of type XML.

    For more information, see the documentation topic Create a data source.

  2. Set the XPATH to a relative path with a condition.

    For example, set XPATH for each row to //incident[number='INC0010007']

  3. Click Load all records.

    Note that the records are not loaded and a a message appears on the data source:

    Relative XPATH expression is not recommended and can impact instance performance


The XML data source import uses the XMLStreamDocument function, which in specific cases is not able to handle relative path with conditions, and returns null. Also, the use of a relative path involves extra overhead on the function.


To avoid both the search missing the date and to avoid performance issues on evaluating relative paths, use absolute paths, for example, /unload/incident[number='INC0010007'].


Article Information

Last Updated:2019-08-02 21:23:15