Sorry to state the obvious, but the best way to deal with this is not to mapping the value in the first place. That is, use conditional mapping to copy value(s) only when they are actually available. It saves you from the performance hit of having to do documentToXMLString -> StringReplace -> xmlStringToXMLNode -> xmlNodeToDocument. Can be a factor in heavily loaded IS.
If you’re dealing with largeDocs, then you can’t even do StringReplace on the whole document. That’ll really be a phenomenal performance bottleneck.
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services