A. Hoog wrote:
>  
> 
> I need to include some sample XML in a programming list however XML will
> not let me paste in the code.  Obviously, the code causes a problem.  I
> tried copying in with a text editor and then opening in XMLMind but
>  received a parse error.  I tried just removing the opening <xml> tag on
> the content but it still did not display properly.  Is there a workaround?
> 
>  
> 
> Here’s an example of the content I want to include:
> 
>  
> 
> <?xml version='1.0' encoding='utf-8' standalone='yes' ?>
> <xxx>
> ...
> <yyy />
> ...
> </xxx>
> 
>  

The above snippet is well-formed XML. If I save it in a separate file, I
can open it in XMLmind XML Editor.

However, if I have really understood your problem, this has nothing to
do with it.

You want to see the above XML source in say, a DocBook programlisting or
in an XHTML or DITA pre. In order to do that, you want to be able to
paste it as plain text, and not as XML, in the programlisting or the pre
element.

But XMLmind XML Editor being a validating editor, you cannot copy a map
element and paste in into a programlisting element.

Here's the trick which should allow you to do what you want (I often do
this for my own needs):

[1] Open the above XML source in a text editor.

[2] Copy (Ctrl-C) everything but the first two characters "<?" to the
clipboard.

[3] Because XMLmind XML Editor cannot parse the contents of the
clipboard as XML, it will consider that the contents of the clipboard is
just plain text.

[4] Using  XMLmind XML Editor, click in the programlisting and press
Ctrl-V. You should see your XML source code now.

[5] Type the missing "<?" by hand.

There are of course more elaborate ways to *include* XML source files
(or any other kind of text file) *as* *is* in XMLmind XML Editor.

For example,

* DocBook textobject/textdata elements. See
http://www.docbook.org/tdg/en/html/textobject.html

* OR XInclude with parse="text" using menu item "Edit|Reference|Include
Text". See
http://www.xmlmind.com/xmleditor/_distrib/doc/help/editMenu.html#referenceMenu




 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to