Hallo,
ich habe ein XML in die eine weitere XML Quelle mit XInclude eingeordnet werden soll
file1.xml
<root xmlns="zzzz" xmlns:hh="http://www.hh.com" xmlns:xi="http://www.w3.org/2001/XInclude">
<test>
<xi:include href="file2.xml" parse="xml" encoding="UTF-8"/>
.
.
<test>
</root>
file2.xml
<root xmlns="http://www.hh.com">
<neuesElement id="neuesElement">
<KindElement>....</kindElement>
</neuesElement>
</root>
Eigetlich sollte dann so etwas kommen:
<root xmlns="zzzz" xmlns:hh="http://www.hh.com" xmlns:xi="http://www.w3.org/2001/XInclude">
<test>
hh:root
<hh:neuesElement id="neuesElement">
hh:KindElement....</hh:kindElement>
</hh:neuesElement>
</hh:root>
<test>
</root>
Es wird jedoch scheinbar "nur" so ohne Namensraum eingebracht:
<root xmlns="zzzz" xmlns:hh="http://www.hh.com" xmlns:xi="http://www.w3.org/2001/XInclude">
<test>
<root>
<neuesElement id="neuesElement">
<KindElement>....</kindElement>
</neuesElement>
</root>
<test>
</root>
Hat jemand eine Idee, wie man den Namespace mit übernehmen?