xml xpath data misaligned

I have the same issue this post (Xpath creating incorrect data - #4 by ArjenEX), but I think some differences in my data are preventing this solution from working.
The columns of my data are getting misaligned.
header 232202 should be empty, and header 232203 should be 0,12 and kg, see output. I have been trying some different xpaths, but I can’t seem to get the values properly aligned. I think it might be because emtpy values are written as <Value />.

some of the data in which the columns are getting mismatched:

<SupplierProperties>
            <Property header="232202">
              <Value />
              <Assets />
            </Property>
            <Property header="232203" unit="kg" ezBaseUnit="kg" ezBaseUnitDescription="Kilogram" ezBaseUnitCategory="Gewichten">
              <Value>0,12</Value>
              <Assets />
            </Property>
            <Property header="232205">
              <Value />
              <Assets />
            </Property>
            <Property header="232207" unit="mm" ezBaseUnit="mm" ezBaseUnitDescription="Millimeter" ezBaseUnitCategory="Maatvoering">
              <Value>14x18</Value>
              <Assets />
            </Property>
            <Property header="232208" unit="mm" ezBaseUnit="mm" ezBaseUnitDescription="Millimeter" ezBaseUnitCategory="Maatvoering">
              <Value>8</Value>
              <Assets />
            </Property>
            <Property header="232209">
              <Value />
              <Assets />
            </Property>
            <Property header="232210">
              <Value />
              <Assets />
            </Property>
            <Property header="232211">
              <Value />
              <Assets />
            </Property>
          </SupplierProperties>

xpath:

output:

Hi @Mapijs

The approach I explained in the other topic also applies to your situation :wink:

You first need to extract all properties separately with a NodeCell(MultipleRows) query based on /SupplierProperties/Property[*]

Once you have this, the corresponding values and dimensions can be queried with a second Xpath node. The queries for this are now much simpler and generate the correct output.

Hope this helps!

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.