Example
This CNXML:
<para id="codeexample">
Enter the command <code>ls /etc</code> to
get a listing of configuration files.
</para>
Results in this display:
Enter the command ls /etc to get a listing of
configuration files.
Example
This CNXML:
<code type="block">
function popUp() {
var popmsg = 'Hello & goodbye';
alert($popmsg);
}
</code>
Results in this display:
function popUp() {
var popmsg = 'Hello & goodbye';
alert($popmsg);
}
Note that ampersand and angle bracket characters (
&,
<, and
>) must be
escaped (
what's
this?). Their escaped equivalents are
&,
<, and
>, respectively. Alternatively, one
can insert
<![CDATA[ before the
code text and
]]> after it (
what's
this?) to eliminate the need for escaping.