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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Parsing xml with multiple headers Talend

Hello community,

 

I'm trying to read xml data received from trestclient which have multiple header

Example :

<?xml version="1.0" encoding="utf-8"?>                         
 <RepeaterData>
<Version />
<Items>
    <Item>
        <year>2017</year>
        <Additional>
            <?xml version="1.0" encoding="utf-8"?>
            <RepeaterData>
                <Version />
                <Items>
                        <Name>toto</Nom>
                </Items>
            </RepeaterData>
        </AdditionalCharge>
    </Item>
    <Item>
        <year>2018</year>
        <Additional >
            <?xml version="1.0" encoding="utf-8"?>
            <RepeaterData>
                <Version />
                <Items>
                    <Item>
                        <element type="System.String">3</Sousdept>
                        <Name type="System.String">toto</Nom>
                        </Item>
                    <Item>
                        <element type="System.String">3</Sousdept>
                        <Name type="System.String">tata</Nom>
                        </Item>
                </Items>
            </RepeaterData>
        </Additional>
    </Item>
</Items>

 

I tried also to delete the xml header with StringHandling.EREPLACE ( b ,"<?xml version=1.0 encoding=utf-8?>",""); but it's not working

Help please !!!!

Labels (4)
2 Replies
vapukov
Master II
Master II

You have a lot of errors in this XML

and additional header is only part of many

You need seriously debug structure with proper XML tools, as variant - Oxygen or Altova (or similar)

Anonymous
Not applicable
Author

@vapukov OK for Xml errors but how to parse an XML with two headers with Talend ? ( this Xml i get it from a TRestClient )