xmlstringtoxmlnode flow service does not encoding & which is available in xml field

Hi,

I am having one xml which contains the & in one of the field.I want to parse the xml and convert into document.for this first i used the xmlstringtoxmlnode service then xmlnodetodocument.
but it is failing in xmlnodetodocument step and Error thrown is malformed entry found as &.

Then in xmlstringtoxmlnode service I set the encoding as ISO-8859-1, then also its not working. Even though i tried to set UTF-8, then also did not worked…

Any idea??? what is the workaround of this???

I am using 8.2 Webmethod inigration server…

Please help me…

Below is one of the work around for this

before xmlstringtoxmlnode use string replace service to replace & with & amp ; in the xmlstring

then the xml will be parsed correctly

an XML with un-encoded & in it is an invalid XML.
replacing & with & may potentially double encode other valid values like © or > etc.

You need to find why you have an invalid XML to start with. Fix it from the source.

1 Like

Yes ofcourse to cross the issue replace service would be option…but I would agree with Tong Wang that why they are sending XML which is not encoded properly with ampersand symbols in the date…check with your source also.

HTH,
RMG