Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
JavierP2
Contributor
Contributor

Add a linebreak after each tag close

Hi there community!

 

I'm thinking how to manage the following scenario, I really don't know what's needed, hope you can help me:

 

Issue:

 

I have xml files like this one (all the tags in 1 line):

 

0683p000009MZfq.png

 

Due the endprogram rules I do need to add (space break) after each tag to look as this one:

0683p000009MZxL.png

Do you think is there any way to achieve this? I will need to do it for many different files that will appear on a SFTP.

 

Thanks a lot!

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

If the content is into a file, you need to read it, then change the content as explained and rewrite it.
You should share your job design for a better understanding if your usecase.

View solution in original post

6 Replies
TRF
Champion II
Champion II

row1.string.replaceAll(">", >\n") may help

JavierP2
Contributor
Contributor
Author

Thanks for the answer.

 

Where can I put that? into a tFileList? 

TRF
Champion II
Champion II

No, tFileList is there to get file list from a folder.
Here you want to change a field value, so you can use tMap, tJavaRow or tJavaFlex component to achieve this.
JavierP2
Contributor
Contributor
Author

Thanks for the answer,

 

I've tried but had an error, I suppose I have to convert the xml to a String?

TRF
Champion II
Champion II

If the content is into a file, you need to read it, then change the content as explained and rewrite it.
You should share your job design for a better understanding if your usecase.
JavierP2
Contributor
Contributor
Author

Hi,

 

I've solved it in other manual way, I think it would be easier.

 

Thanks a lot for your help.