Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Unable to get XML data of intermediate level

$
0
0
I'm trying to read a three-level XML file:

HTML Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<CAB>
<NUMPED>ped1</NUMPED>
<LINALB>
<REFPROV>prov1</REFPROV>
<LOTE>
<NUMLOTE>lote1</NUMLOTE>
</LOTE>
</LINALB>
<LINALB>
<REFPROV>prov2</REFPROV>
<LOTE>
<NUMLOTE>lote2</NUMLOTE>
</LOTE>
</LINALB>
</CAB>

Loop XPath: /CAB/LINALB/LOTE

No problem reading the detail field
XPath: NUMLOTE

No problem reading the CAB field
XPath: //NUMPED

But no way to get the correct /LINALB data. I tried:

XPath: /REFPROV -> I get a null value
XPath: /CAB/LINALB/REFPROV -> I get "prov1" for all lines instead of the correct "prov1" on the first line and "Prov2" on the second one.
Xpath: //REFPROV -> I get "prov1" for all lines instead of the correct "prov1" on the first line and "Prov2" on the second one (I expected a null or an error on this one ...)

Any idea what I'm doing wrong?

Thks

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>