include CDATA in CDATA

View: New views
2 Messages — Rating Filter:   Alert me  

include CDATA in CDATA

by rageice :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, excuse me for my bad english.

I am actually trying to display xml using docbook. To do this, I use:
<programlisting>
<![CDATA[
  my_text
]]>
</programlisting>

But if the text i want to insert contains itself a <![CDATA[ ...]]> tag, my method does not function.

Have you an other one?

Parent Message unknown Re: include CDATA in CDATA

by Thomas Schraitle :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> I am actually trying to display xml using docbook. To do this, I use:
> <programlisting>
> <![CDATA[
> my_text
> ]]>
> </programlisting>
>
> But if the text i want to insert contains itself a <![CDATA[ ...]]> tag, my
> method does not function.
>
> Have you an other one?

You don't have to use the above CDATA section. You can also quote your text,
it means, replace the characters < and & with < and &. For CDATA you
use "<![CDATA[" and "]]>".

For example, if you want to code the above example into a screen, you write:

<screen>
<programlisting>
 <![CDATA[
 my_text
 ]]>
</programlisting>
</screen>

Hope that helps,
Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@...
For additional commands, e-mail: docbook-help@...