XML escaping characters

Hi,

For some XML transmissions, I’m getting an error message of ‘[ISC.0042.9327] Expecting </otm:Description> got </otm:Packaging>’.

My assumption is that some character between the otm:Description tag is causing this error. We’re already escaping the ‘less than’ symbol.

In all of these XML transmissions, the commonality appears to be that the ‘@’ symbol is found in the string between otm:Description and /otm:Description>. Does the ‘@’ symbol need to be escaped?

Thanks,

Ken

Every XML manual I could find states that ‘@’ is not a special XML char and hence does not have to be escaped.

Hi fml2,

I found the same. Nothing I’ve googled indicates that ‘@’ needs to be escaped. I’m perplexed as to why I’m seeing this error, but my assumption is that there must be some character that needs to be escaped.

Thanks,

Ken

Nobody will be able to help you without having a sample file and the transformation causing the error.

Can you share the flow snippet and a sample xml?

I think you are using the service “pub.xml:documentToXMLString”, set encode, check the BIS guide.

Hi Mahesh,

Yes, we are using “pub.xml:documentToXMLString”. The encode parameter is set as blank; however, I previously changed it to true and that encodes everything, including the tags, which causes failures every time, so I changed it back to blank.

The flow service goes from “pub.xml:documentToXMLString” to “pub.xml:xmlStringToXMLNode” to “wm.tn.doc.xml:routeXML”.

I’ve attached the section of the XML transmission that appears to be the cause of the “[ISC.0042.9327] Expecting </otm:Description> got </otm:Packaging>” error. There are multiple “otm:PackagedItemotm:Packagingotm:Description </otm:Description></otm:Packaging></otm:PackagedItem>” tags.

Thanks,

Ken
ExpectingDescriptionGotPackagingXMLSnippet.txt (19.1 KB)

After closer review, there was a “pub.xml:documentToXMLString” service elsewhere in the flow service. Setting encode to “true” there appears to resolve the issue. Thank you.

Awesome! thanks for updating the thread.