MasetrPage.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<PAGE
xmlns:PHOENIX = 'PHOENIX'
xmlns:PHOENIX.CORE = 'PHOENIX/CORE'
xmlns:PHOENIX.CORE.PAGE = 'PHOENIX/CORE/PAGE'
xmlns:PHOENIX.CORE.COMPILER = 'PHOENIX/CORE/COMPILER'
>
</PAGE>
Page.xml
:
<PHEONIX.CORE:EXAMPLE.ELEMENT />
<PHEONIX.CORE:EXAMPLE.ELEMENT2 />
Now I want to include the Page.xml
content inside the MasterPage.xml
PAGE
tag.
My PHP Code:
//[i] Initialize new \DOMDocument from from PageMaster.xml.
$pageDocument = \DOMDocument::load('PageMaster.xml');
//[i] Create fragment from pageDocument and append content from page XML.
$pageDocument_frag = $pageDocument->createDocumentFragment();
$pageDocument_frag->appendXML(file_get_contents('Page.xml'));
But here I get an error that the namespaces are not defined inside the Page.xml
. But for my project I don't want to define the namespaces inside the Page.xml