xmlprinter-control-language

Passing PCL in XML


I need to pass some PCL in an XML file. I assumed a CDATA tag would allow for this but seems to dislike the ESC character. Notepad++ keeps saying, "XML Parsing error. Sequence ']]>' not allowed in content." When I remove the ESC characters it no longer barks at me.

enter image description here


Solution

  • XML does not allow control characters (those with ordinal values less than 32, including ESC) except for carriage return, linefeed, or tab. It is common to transport arbitrary binary data in XML by encoding it as base64, but that requires postprocessing to recover the binary data; XML processing alone is not enough.