Skip to main content
Nintex Community Menu Bar

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

  • Jun 21, 2018 1:33 PM UTC
  • 3 replies
  • 95 views
  • Translate All

Forum|alt.badge.img+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

Forum|alt.badge.img+16
  • Jun 21, 2018 6:00 PM UTC

You could use >>> Replace Substring in String 

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

Replace by ''

Translate

Forum|alt.badge.img+1
  • Author
  • Jun 26, 2018 8:15 AM UTC

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.

Translate

Forum|alt.badge.img+17
  • Apr 29, 2019 7:15 PM UTC

@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

Translate