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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error processing resource while parsing XML with '&' symbol

Hi
I want to parse xml through Talend job.
In my xml contains special characters like"&" as "&" and "<" as "<" ">" as "&gt" "" etc
How to replace this special characters while parsing xml file through Talend?
sample xml
<?xml version="1.0"?>
<Extract>
<Record>
<ID>1</ID>
<NAME>Product 1</NAME>
<ATTS>
<ATT>Me & my attribute</ATT>
<ATT>Another attribute</ATT>
</ATTS>
</Record>
<Record>
<ID>2</ID>
<NAME>Product 2</NAME>
<ATTS>
<ATT>Foo attribute</ATT>
<ATT>Bar <br />attribute</ATT>
</ATTS>
</Record>
<Record>
<ID>3</ID>
<NAME>Product 3</NAME>
<ATTS>
<ATT>John Doe attribute</ATT>
<ATT>Foo & bar</ATT>
</ATTS>
</Record>
</Extract>
Please help me.
Thanks
Chin
Labels (3)
28 Replies
janhess
Creator II
Creator II

Your parameters are wrong.
Your loop path should be "/EMPS/EMP"
Your xpath query should be
EMPCODE "STAFF/EMPCODE"
EMPDESIG "STAFF/EMPDESIG"
DEPT "STAFF/DEPT"
ADDRESSCODE "ADDRESS/ADDRCODE"
Anonymous
Not applicable
Author

Yes I know. Please see the problem with AddressCode
<EMP>
<STAFF>
<EMPCODE>111</EMPCODE>
<EMPDESIG>BA</EMPDESIG>
<DEPT>FIN</DEPT>
</STAFF>
<PERMANENT>
<ADDRESS>
<ADDRCODE>XX</ADDRCODE>
<ADDRCODE>ABCDE</ADDRCODE>
</ADDRESS>
</PERMANENT>
<FEEDBACK>
my loop path same worked. Now the problem with <FEEDBACK> tag data with A2&apos;, A1 > A2 > < characters. This problem yet to resolved.
janhess
Creator II
Creator II

I don't have any problem with it/
xpath is "FEEDBACK"
0683p000009MDuE.png
_AnonymousUser
Specialist III
Specialist III

Hi,

How to get the value "homeDefault" and "true" from below xml
<name>
<chChSelectionMode><homeDefault/></chChSelectionMode>
<dynamicAddressFlag><true/></dynamicAddressFlag>
</name>

Since the tool identifies <homeDefault/> as tag but it is actually a value ,how to mention the xpath value in xml metadata
Anonymous
Not applicable
Author

Hi Banu
I believe we cannot directly configure in but i found custom solution , please find in below link:
http://anilkumarburri.wordpress.com/2013/06/18/how-to-process-the-below-xml-file/
hope it is going to help u


thanks
Anil Kumar Burri
http://anilkumarburri.wordpress.com/
_AnonymousUser
Specialist III
Specialist III

Hi Anil,

the link which u pasted is not opening only .......................
Anonymous
Not applicable
Author

HI Banu
Its working for me, otherwise try this:
http://anilkumarburri.wordpress.com/

thanks
Anil Kumar Burri
_AnonymousUser
Specialist III
Specialist III

Hi, 
I have error "<faultstring>The entity name must immediately follow the '&amp;' in the entity reference.</faultstring>"
while I load xml through TSoap. 
In my xml 
<Name> See &amp; Go</Name>
Anonymous
Not applicable
Author

it helps!