Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!

cSplitter with XPath is not working/splitting as expected

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendSolutionExpert
Contributor II
Contributor II

cSplitter with XPath is not working/splitting as expected

Last Update:

Feb 9, 2024 1:22:49 PM

Updated By:

Jamie_Gregory

Created date:

Apr 1, 2021 6:13:26 AM

Problem Description

cSplitter with XPath language is not splitting as expected when consuming the correct XML input with the correct XPath expression.

 

In this case, the input XML looks like this:

<elmt1 xmlns="http://xyz.company.com">
  <msg>
    ....
  </msg>
  <msg>
    ....
  </msg>
  ...
</elmt1>

The XPath expression is:

/elmt1/msg

 

Root Cause

The input XML has namespace definitions.

 

Solution

Configure the cSplitter to Add Namespaces declarations by performing the following steps:

  1. Select the Add Namespaces check box.

  2. Click the plus (+) sign to add Namespaces.

    1. Enter the name of your namespace in the Prefix column, (you can choose any name, it doesn't have to match the one in the input XML), for example, "v".

    2. Enter the URL for your namespace in the URL column, for example, "http://xyz.company.com".

  3. Then change the XPath Expression to include the namespace Prefix you added above. In this example, the expression becomes, "/v:elmt1/v:msg".

    0693p000008uG37AAE.jpg

Version history
Last update:
‎2024-02-09 01:22 PM
Updated by: