In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Parsing data from less than/greater than brackets

atjhsieh
6 - Meteoroid

I was wondering if anyone knew the best way to parse out a long string like the below?

 

"<Session xmlns=\"blablabla.com/bla/bla/bla\ "><Parameter Name=\"bla\"><Value>12345</Value></Parameter><Parameter Name=\"bla_bla\"><Value>bla</Value></Parameter><Parameter Name=\"bla_bla_bla\"><Value>bla</Value></Parameter></Session>"

 

I'm pulling from a Cosmos DB with thousands of lines like this, and I ultimately want something in the format below. 

 

blabla_blabla_bla_bla
12345blabla

 

In addition, I'm running into an issue where the data is getting truncated when I bring it in from the input data tool, even after I throw a browse on afterwards. 

 

Any suggestions on either of the issues is welcome. Thank you! 

3 REPLIES 3
FilipR
11 - Bolide

Please see attached. 

 

FilipR_0-1659028024847.png

 

Brian32
8 - Asteroid

Good Afternoon - 

 

Another method is Regex Tool to Tokenize the String.  Use the syntax: (><[[:alpha:]]+\s[[:alpha:]]+.\\"\w+\\"><\w+.\w+)

From there just Parse and use a Replace Function to get down to your values.  Hope this helps!

Brian32_1-1659030141768.png

 

atjhsieh
6 - Meteoroid

Thank you both for the help! 

Labels
Top Solution Authors