Workflow Document Generation: Converting XML to table keeps "&" and won't work with just "&"

  • 4 November 2021
  • 1 reply
  • 2 views

Badge +4

Hello all,

I am using the Nintex Workflow Document Generation action in one of the workflows for my company.  It works great except for one area.

The XML notation for special characters, specifically & and ', has to be stored as "&" and "'" respectively.  I know there are many more, but I'm sure the resolution to this would also fix those as well.

I tried to use a Regular Expression action to replace the two XML syntax, but fixing that made the XML code invalid and error.  The invalid XML did not create tables correctly in the Document Generation action.

What I am really looking for is the best of both worlds: being able to show the values in the XML in tabular format while also replacing the XML syntax with regular special characters.  Can this be done?

Thank you!

Owen


1 reply

Userlevel 4
Badge +10

Hi,


The exemple that you show is encoded twice.


 


The encoded value for & is &


The encoded value for ' is '


 


And so with a double encode your ' is encoded : ' and your & is encoded &


 


So, to have a valide XML you should :



  1. Replace & by &

  2. Replace & by &

  3. Replace ' by "

  4. ... all other special char


 


Else, you can try to fond a webservice that decode your XML (And use CallWebService action). But you need to find the webservice that make your decode.


 


Don't forget to check the nintex gallery : https://gallery.nintex.com/


you can find some usefull workflow.


For exemple :  


https://gallery.nintex.com/60abb27049c81e0035b3ede5/Convert%20O365%20Repeating%20Section%20XML%20to%20JSON?tenant=null


 


 


Just for clarification, why you send XML to your document generation ?

Reply