Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
XML Data sources using relative XPATH with conditions can impact instance performance and ignore some records - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • XML Data sources using relative XPATH with conditions can impact instance performance and ignore some records
KB0622077

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


6770 Views Last updated : Jan 28, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

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



Problem


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:

//path[condition]

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

Cause


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.

Resolution


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'].



 

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.