Re: [docbook] Including external XML file for example code

From
Stefan Seefeld <>
Date
2007-11-22T16:00:32+00:00
ID
Thread
Re: [docbook] Including external XML file for example code
Mansour wrote:
> I am trying to include an XML document that is an example in my docbook
> article. I have been around, but could not get what I need. Google did
> return the pages I wanted. Maybe I am using the wrong key words. Can
> anyone suggest a link for a tutorial or tell me how to get this done.
> The example XML document is a full XML document and is part of a program
> so, there can be DOCTYPE and xml header.

Assuming that you want to display the content verbatim, you may consider

<programlisting>
  <xi:include
     xmlns:xi="http://www.w3.org/2003/XInclude"
     href="example.xml" parse="text"/>
</programlisting>

Google for XInclude and docbook programlisting to learn how this works.

HTH,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...