Not straightforward, because newline is not allowed in xml attribute value if I remember well.
You can send it using hexadecimal value of CR LF ( 0x0d 0x0a) like this:
There is also an easier solution for this, without the hex="true" flag. You can simply insert "
" for "\n" and "
" for "\r" in your text string, or any other ascii code (in hex format, preceded by ampersand, hash sign and followed by semicolon). That's the standard way to escape special characters in XML. http://www.w3.org/TR/REC-xml/#sec-references
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi for all!
Is there any way to send CRLF in ioport?
BR,
James
Not straightforward, because newline is not allowed in xml attribute value if I remember well.
You can send it using hexadecimal value of CR LF ( 0x0d 0x0a) like this:
<action type="ioport-tx" ioport="xyz" hex="true" data="0d0a"/>
Hi,
There is also an easier solution for this, without the hex="true" flag. You can simply insert "
" for "\n" and "
" for "\r" in your text string, or any other ascii code (in hex format, preceded by ampersand, hash sign and followed by semicolon). That's the standard way to escape special characters in XML.
http://www.w3.org/TR/REC-xml/#sec-references