webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

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

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

    Posted Thu September 05, 2013 09:56 AM

    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…


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 2.  RE: xmlstringtoxmlnode flow service does not encoding & which is available in xml field

    Posted Thu September 05, 2013 10:24 AM

    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


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 3.  RE: xmlstringtoxmlnode flow service does not encoding & which is available in xml field

    Posted Thu September 05, 2013 01:26 PM

    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.


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: xmlstringtoxmlnode flow service does not encoding & which is available in xml field

    Posted Thu September 05, 2013 02:36 PM

    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


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB