Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic File include support? (Read 5159 times)
Cardanine
Guest


File include support?
Dec 3rd, 2005 at 12:02am
Print Post  
Is there any way to use some kind of <include file="C:/myfile.xml"/> tag and have XML Viewer display the contents of the included file as if it were part of the original file?

Example:
myfile1.xml:

<parent>
<myelement1 attribute1="value1"/>
<include file="C:/myfile2.xml">
<myelement3 attribute3="value3"/>
</parent>

myfile2.xml:
<myelement2 attribute2="value2"/>


XML Viewer:

parent
    myelement1
    myelement2
    myelement3

Any info is appreciated.
Thanks.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: File include support?
Reply #1 - Dec 5th, 2005 at 8:18am
Print Post  
Hi, try declaring external entities using the DTD ENTITY tag, then just refer to these entities from within the master XML file. I have not tried whether that works in XML viewer, it should work if the MSXML parser supports parsing the external entity files.
  
Back to top
 
IP Logged
 
Cardanine
Guest


Re: File include support?
Reply #2 - Dec 6th, 2005 at 4:46pm
Print Post  
I tried doing this a while back, XML Viewer just inserts an empty node instead of the contents of the included file.

The reason I want to do this is because I want use XML Viewer as a simple property editor for programmers and non-programmers alike, all of whom are using a version control system (Perforce). I want to include the documentation for all the attributes in one file and all the user's attribute values in another file so that when each person sync's to the latest version of the documentation, it appears in XML viewer without blowing away their customized attribute values.

If that makes sense Smiley
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: File include support?
Reply #3 - Dec 7th, 2005 at 7:01am
Print Post  
Ok, I will play with the MSXML API, there could be some option available to parse external entities and it might be disabled by default.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint