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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to save Base64 from XML to file ?

Hi,
I'm new to Talend and i've been searching all over the net about how to iterate an XML and save bytes to file.
I still didn't manage to understand how to get it done.
I have the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<row>
<actorid>1</actorid>
<name>AAA</name>
<pdf> SOME BASE64 STRING NEEDS TO BE CONVERTED TO BYTES AND SAVED TO FILE </pdf>
</row>
<row>
<actorid>2</actorid>
<name>BBB</name>
<pdf> SOME BASE64 STRING NEEDS TO BE CONVERTED TO BYTES AND SAVED TO FILE </pdf>
</row>
<row>
<actorid>3</actorid>
<name>CCC</name>
<pdf> SOME BASE64 STRING NEEDS TO BE CONVERTED TO BYTES AND SAVED TO FILE </pdf>
</row>
</root>
As I mentioned, I need to run over the XML --> convert each base64 string to bytes --> save it to file.
I do managed to read the input file and set a schema to it (You can see it in the attached image).
Any help ?
0683p000009MDyu.png
Labels (3)
7 Replies
Anonymous
Not applicable
Author

Any help ?
Anonymous
Not applicable
Author

Hi,
If you search on the exchange platform (keyword: base64) you'll find a component and a routine collection which just might address your problem.
Good luck.
Anonymous
Not applicable
Author

Hi,
1. What is "exchange platform" ?
2. Can you describe the message flow ? I'm very new to Talend and I can't figure out what should be the message flow.
Anonymous
Not applicable
Author

Hi,
Talend Exchange Platform is the place where Talend community can share items related to Talend open source products.
Here is a custom component tBase64 which allows you to encode/decode distinctly each dataset columns by base64 scheme.
Best regards
Sabrina
Anonymous
Not applicable
Author

@xdshi Thank you ! That really helps!
Just one more question:
How do I save each base64 to a file with custom file name convention ?
Thanks!
Anonymous
Not applicable
Author

Still stuck.
Any help with saving multiple files with custom convention for each one ?
Anonymous
Not applicable
Author

Did you ever solve your problem? I ran into the same issue.