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

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

See above!
Anonymous
Not applicable
Author

Please explain me.
janhess
Creator II
Creator II

Your xml example doesn't contain &&
You need to identify the file that is producing the error.
Which version are you using?
Anonymous
Not applicable
Author

Still I am not able to do with my xmls.
See below :
My requirement : I have a zip folder around 30.
I did the following :
Step 1: Unzip the folder using with and put it in a temporary folder
tFileList_1 --> tSystem
"unzip "+((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) +" -d " + context.tempdirectory
I open my xml file, it seems below format: so that it is throwing error.
Exception in component tFileInputXML_1
org.dom4j.DocumentException: Error on line 15 of document : The entity name must immediately follow the '&' in the entity reference. Nested exception: The entity name must immediately follow the '&' in the entity reference.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc >
<EMPS>
<EMP>
<STAFF>
<EMPCODE>111</EMPCODE>
<EMPDESIG>BA</EMPDESIG>
<DEPT>FIN</DEPT>
</STAFF>
<PERMANENT>
<ADDRESS>
<ADDRCODE>XX</ADDRCODE>
<ADDRCODE>ABCDE</ADDRCODE>
</ADDRESS>
</PERMANENT>
<FEEDBACK>
The Definitive Guide we offer a step by step guide on
how to install MongoDB and get it up and running smoothly.
Precompiled binaries are available for Linux, Mac OS X, Windows,
and Solaris. On most platforms you can download the archive from mongodb.org,
inflate it, and run the binary. "there is ink" in Fig. 3 The MongoDB server requires a directory it can write
database files to and a port it can listen for connections on.
The following section covers the entire install on the two variants of system:
Windows and everything else (Linux, Max, Solaris). 200 is A2&apos;, A1 > A2 > A3 - A7 is
Precompiled binaries are available for Linux, Mac OS X, Windows,
and Solaris. On most platforms you can download the archive from mongodb.org,
inflate it, and run the binary.
</FEEDBACK>
</EMP>
</EMPS>
janhess
Creator II
Creator II

Your example works fine in 5.0.2. Saying the same thing over and over again is not going to help.
Post an image of your job and your TOS version.
Anonymous
Not applicable
Author

I am using Talend 4.0.3 r47759 and from the attached screenshot 4.png, tRunJob_1 throwing error
Exception in component tFileInputXML_1
org.dom4j.DocumentException: Error on line 15 of document : The entity name must immediately follow the '&' in the entity reference. Nested exception: The entity name must immediately follow the '&' in the entity reference.
Please find attached screenshot of my jobs.
My XML :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc >
<EMPS>
<EMP>
<STAFF>
<EMPCODE>111</EMPCODE>
<EMPDESIG>BA</EMPDESIG>
<DEPT>FIN</DEPT>
</STAFF>
<PERMANENT>
<ADDRESS>
<ADDRCODE>XX</ADDRCODE>
<ADDRCODE>ABCDE</ADDRCODE>
</ADDRESS>
</PERMANENT>
<FEEDBACK>
The Definitive Guide we offer a step by step guide on
how to install MongoDB and get it up and running smoothly.
Precompiled binaries are available for Linux, Mac OS X, Windows,
and Solaris. On most platforms you can download the archive from mongodb.org,
inflate it, and run the binary. "there is ink" in Fig. 3 The MongoDB server requires a directory it can write
database files to and a port it can listen for connections on.
The following section covers the entire install on the two variants of system:
Windows and everything else (Linux, Max, Solaris). 200 is A2&apos;, A1 > A2 > A3 - A7 is
Precompiled binaries are available for Linux, Mac OS X, Windows,
and Solaris. On most platforms you can download the archive from mongodb.org,
inflate it, and run the binary.
</FEEDBACK>
</EMP>
</EMPS>
0683p000009ME9w.png 0683p000009MEA1.png 0683p000009MEA6.png 0683p000009MEAB.png
janhess
Creator II
Creator II

What's the runjob doing? Presumably that's where the tFileInputXML is?
Works in 4.0.2 as well.
Anonymous
Not applicable
Author

Hi Janhess,
tRunJob is calling Child job for insert XML info into each tables.
Here is the screenshot.
0683p000009ME8Q.png
janhess
Creator II
Creator II

That tFileInputXML doesn't match the example xml you posted. It's looping on /simple-patent-document/bibliographic-data which doesn't appear in your example. We can't help if you don't post the correct data.
Anonymous
Not applicable
Author

sorry it was wrong screenshot.
Please see the screenshot.
0683p000009MDz0.jpg