Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.

Replacing text in xml files

Highlighted
5 - Atom

My XML file is stored in a SQL server table column and I want to replace First and last names and create a new xml file.

Names to be replaced are on a different table , SSN is the key column  

 

<Name>
<First>Martin</First>
<Last>N</Last>
</Name>
<SSN>123456789</SSN>
 

Table:

SSN              First        Last

123456789   James     Parker

 

Final Output should be like :

 

<Name>
<First>James</First>
<Last>Parker</Last>
</Name>
<SSN>123456789</SSN>

 

Please help

 

 

Highlighted
Inactive User
Not applicable

Take that XML and parse into rows using < as the delimiter. Then cross tab the rows into columns using a group by, such as record ID or using  a formula to pull the SSN to a separate field then do the cross tab grouping on it. Then just do a join and replace. Once that is done, rebuild it into XML using a formula tool. Then concatenate all of those fields and use \n for the concat. Done.

Highlighted
5 - Atom

Thank you, Ryan

Highlighted
5 - Atom

Ryan ,

 

Do you have a sample work flow that you can share for this.

Highlighted
8 - Asteroid

How would you "rebuild the xml"? Curious to what kind of methodologies you had in mind when considering indentation

Labels