Mike Maxwell wrote: > Hussein Shafie wrote: >> rechtsfrage at web.de wrote: > >> ... >>> I want to document some special XML syntax and want to give some >>> examples. >>> >>> Is it not possible to have XML-code within docbook? >> ... >> This is possible. We do that all the time. And yes, there is a trick. >> ... >> * TRICK: If you copy nearly all the text, from "?xml" to >> "/mediaobject>", (i.e. omit the leading "<"), XXE cannot parse it as >> XML and therefore will consider it as being plain text. This allows >> you (1) to paste the text in the programlisting (2) to type the >> leading "<" by hand. > That solves the pasting problem, but won't XMLmind still complain that > you have a malformed document? At least that was my experience when > embedding XML docs inside DocBook. > > The way we used to get around that problem is to convert all the '<' in > the embedded XML to '<', and all the '>' to '>'. They of course > display as '<' and '>', so XMLmind is happy, and we're happy. It does > however require an extra step in the process, to convert these characters.
You don't need to do such things if you exclusively use XXE to edit your document. If, using XXE, you paste "<hello/>" as plain text, you'll see the string "<hello/>" in the styled view/tree view and you'll automatically get the string "<hello/>" in the save file.

