message.removeProlog¶
Signature: message.removeProlog()
Returns: void
Remove the XML prolog or XML declaration.
Note
This method only applies to XML formatted messages.
Parameters¶
None
Example¶
// Example: Remove the XML prolog (XML declaration) from a document.
// Sample XML message structure (with prolog)
message = qie.createXMLMessage(`<?xml version="1.0" encoding="UTF-8"?>
<root>
<employee>
<name>Thomas</name>
</employee>
</root>`);
// Remove the XML prolog
message.removeProlog();
/* result:
<root>
<employee>
<name>Thomas</name>
</employee>
</root>
*/