Hi,
I was wondering whether it would be possible to somehow include multiple documents in XML -file that also has includes from other xml files?
For example with entities and SYSTEM command, it's possible to include other documents, e.g. test.xml
<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE testi [
<!ENTITY C SYSTEM "./test2.xml">
]>
<root>
<testing>
&C;
</testing>
</root>
But if test2.xml has entity declaration, the file test.xml cannot be loaded, because there is multiple entities.
Is there any way to workaround this?
Also is it possible to include data to specific location of XML-file from the same document with XPath or some other way create a reference to it, e.g.
<DOCUMENT>
<SECT>
<data>some data</data>
<!-- can I somehow get section 2 here ? -->
</SECT>
<SECT2>
<data>some data in sect2</data>
</SECT2>
</DOCUMENT>
so the document would look then like this:
<DOCUMENT>
<SECT>
<data>some data</data>
<SECT2>
<data>some data in sect2</data>
</SECT2>
</SECT>
<SECT2>
<data>some data in sect2</data>
</SECT2>
</DOCUMENT>
I'm using Perl and XML::XPath for processing the XML-data, so could it be possible for it to "see" the data like presented above. It handles the ENTITY -declarations ok, but can data be referenced somehow, so that e.g. SECT2 could be referenced in SECT and it would look like the data would be there?
Thank you!
I was wondering whether it would be possible to somehow include multiple documents in XML -file that also has includes from other xml files?
For example with entities and SYSTEM command, it's possible to include other documents, e.g. test.xml
<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE testi [
<!ENTITY C SYSTEM "./test2.xml">
]>
<root>
<testing>
&C;
</testing>
</root>
But if test2.xml has entity declaration, the file test.xml cannot be loaded, because there is multiple entities.
Is there any way to workaround this?
Also is it possible to include data to specific location of XML-file from the same document with XPath or some other way create a reference to it, e.g.
<DOCUMENT>
<SECT>
<data>some data</data>
<!-- can I somehow get section 2 here ? -->
</SECT>
<SECT2>
<data>some data in sect2</data>
</SECT2>
</DOCUMENT>
so the document would look then like this:
<DOCUMENT>
<SECT>
<data>some data</data>
<SECT2>
<data>some data in sect2</data>
</SECT2>
</SECT>
<SECT2>
<data>some data in sect2</data>
</SECT2>
</DOCUMENT>
I'm using Perl and XML::XPath for processing the XML-data, so could it be possible for it to "see" the data like presented above. It handles the ENTITY -declarations ok, but can data be referenced somehow, so that e.g. SECT2 could be referenced in SECT and it would look like the data would be there?
Thank you!