Is it possible to include one XML document within another XML document? Please give some samples.


Many possibilities:

  • Using external parsed entities:
    <!DOCTYPE wrapper [
    <!ENTITY wrapped SYSTEM "wrapped.xml">
  • Using XInclude:
    <wrapper xmlns:xincl="http://www.w3.org/1999/XML/xinclude">
      <xincl:include href="wrapped.xml"/>
    You'll need an XInclude processor.
  • Using an XSLT stylesheet and the document() function.
  • Using an XLink with xlink:show="embed".
  • etc.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.