Question & Answer
Question
How to remove an XML prolog using Document Keyword Replace *|* -81D144E1BDDF6CB085257919000530C7- *|*
Answer
Technote (FAQ)
Question
How to remove an XML prolog using Document Keyword Replace
Answer
It is possible to remove the prolog (or preamble) from an XML document using Document Keyword Replace but you must make sure that the attributes in the prolog match exactly.
The following Document Keyword Replace service will remove the standard prolog created by the DOMToDoc function.
If the prolog looks like this:
<?xml version="1.0" encoding="UTF-8">
This Document Keyword Replace service will remove it:
<operation name="Document Keyword Replace">
<participant name="DocKeywordReplace"/>
<output message="DocKeywordReplaceInputMessage">
<assign to="literal_mode">true</assign>
<assign to="keyword1" from="string('<?xml version="1.0" encoding="UTF-8"?>')"></assign>
<assign to="replace1" from="string('')"></assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
| Segment | Product | Component | Platform | Version | Edition |
|---|---|---|---|---|---|
| Commerce | Sterling B2B Integrator | Adapters |
Historical Number
HTG1523
Was this topic helpful?
Document Information
Modified date:
12 October 2021
UID
ibm10767365