Extract "<?xml version='1.0' encoding='utf-8'?>" from string using a Regular Expression

  • 21 June 2018
  • 3 replies
  • 16 views

Badge +1

Hi Folks, Hope someone can help.

 

I have been working to get the Embedded Repeating Sections working in 365 Workflow and I am really close to getting it to work. I have one last hurdle.

 

I have been building Strings from the NFFormData And feeding that into text Variables. This is allowing me to strip out all extra XML generated by the the Embedded Sections and allow me to produce some readable xml for the Workflow to use.

 

The only bit I am having an issue with is removing the extra ><?xml version='1.0' encoding='utf-8'?>< strings produced by each Embedded Section. (it has double lt; and gt; to distinguish it from the main xml header that I need to retain.

 

Can anyone help me with this as I cannot remove the string. I have tried but have failed constantly.

 

Many Thanks

Dave Stuart


3 replies

Userlevel 6
Badge +16

You could use >>> Replace Substring in String 

Search:<?xml version='1.0' encoding='utf-8'?>

Replace by ''

Badge +1

Many thanks Fernando,

I have tried this out and can see how it works but it does not seem to work with embedded xml unfortunately.

It will remove the initial tags if used as the first action but they reappear as the workflow proceeds. I have been trying to remove all the extra xml tags but this is proving difficult.

Badge +17

@dstuart have you tried using the Query XML action to get to the data you need? Its pretty straightforward if your data is setup correctly. Here are a few example post to help with solutions.


 


https://community.nintex.com/t5/Nintex-for-SharePoint/Repeating-Section-in-Nintex-Workflow/m-p/69867#M57760


 


https://community.nintex.com/t5/Template-Gallery/Parsing-Nintex-Forms-Repeating-Section-Solution-O365/ta-p/85704

Reply