title: How can I load multiple XML documents inside my PHP, DOM script?
body: <p>I have two different XML structured documents, an XSLT that renames the elements and nodes of them to satisfy both and a PHP code that will save them into a new XML doc.</p>
  
  <p>This is the code I used for testing purposes, however how can I load two or more paths like book1.xml and book2.xml into the <code>$xml</code> ? I know how to <code>$dom-&gt;load( 'book1.xml' );</code></p>
  
  <pre><code>&lt;?php
  
  // create an XSLT processor and load the stylesheet as a DOM 
  $xproc = new XsltProcessor();
  $xslt = new DomDocument;
  $xslt-&gt;load('stylesheet.xslt');    // this contains the code from above
  $xproc-&gt;importStylesheet($xslt);
  
  
  // your DOM or the source XML (copied from your question)
  $xml = '';
  $dom = new DomDocument;
  $dom-&gt;loadXML($xml);
  
  
  ?&gt;
  </code></pre>