4.3. Code

All the above examples of XML code where printed out by encapsulating them as shown in Example 4.4

Example 4.4. How to include Code

      <example id="BSG.L.004"><title>How to include Code</title>
      <programlisting><![CDATA[
          ****YOUR CODE HERE****
          ]]>
      </programlisting>
      </example>
        
    

The <![CDATA[ and ]]> pair disable the XML interpretation of anything in between, it is necessary only if you actually key in XML code (like I'm doing) and is superfluous for other programming languages.

If you want to have inline code like this and the ones above you should use a <literal>text</literal> pair, with or without a CDATA wrapper.