community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Replacing text in xml files

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

 

 

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.

Thank you, Ryan

Ryan ,

 

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

Asteroid

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

Labels