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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Replacing invalid xml character (Unicode: 0xc)

Hello All

I have a very large XML file. I am reading that file content and storing it in SQL table. Now my issue is the loading is stopping because of the error: 

Exception in component tFileInputXML_1 
org.dom4j.DocumentException: Error on line 1636464 of document : An invalid XML character (Unicode: 0xc) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0xc) was found in the element content of the document.
since it is a very big file, I am not able to use tReplace. How can i solve this error?
 
Regards
Priya
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi @priyadarshiniv 

 

Please read the xml using tFileInputFullRow -> tReplace -> tFileOutputDelimited (cleansed file).

 

Since it is a line by line operation, it will not require much memory to process.

 

Thanks and Regards,

Subhadip

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi @priyadarshiniv 

 

Please read the xml using tFileInputFullRow -> tReplace -> tFileOutputDelimited (cleansed file).

 

Since it is a line by line operation, it will not require much memory to process.

 

Thanks and Regards,

Subhadip

Anonymous
Not applicable
Author

hi @subhadip13 

Thank you for your reply. But the solution doesnt work. The way I have declared is:

0683p000009M5dU.jpg0683p000009M5de.jpg0683p000009M5do.jpg

I get error:

Detail Message: The method replaceAll(String, String, String) in the type StringUtils is not applicable for the arguments (Object, String, String)

Regards

Priya

Anonymous
Not applicable
Author

Hi Priya,

 

    Could you please try to convert the Object to STring using a tCOnvertType. Add this component before tReplace and you can eliminate the above error.

0683p000009M5eX.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂