xml include 另外一个xml文件

主文件Conup.xml

 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 2 <!DOCTYPE conup [
 3 <!ENTITY experiment SYSTEM "ExpSetting.xml">
 4 ]>
 5 <conup>
 6     <configuration>
 7         <algorithm>CONSISTENCY_ALGORITHM</algorithm>
 8         <freenessStrategy>CONCURRENT_VERSION_FOR_FREENESS</freenessStrategy>
 9     </configuration>
10 
11 &experiment;
12 
13 </conup>

另外一个xml文件 ExpSetting.xml

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <experiment>
 3     <setting enable="true">
 4         <type>disruption</type>
 5         <indepRun>50</indepRun>
 6         <nThreads>100</nThreads>
 7         <threadId>50</threadId>
 8         <targetComp>CurrencyConverter</targetComp>
 9         <baseDir>/home/conup</baseDir>
10         <ipAddress>114.212.191.22</ipAddress>
11         <rqstInterval>100</rqstInterval>
12         <updateInterval>80</updateInterval>
13     </setting>
14     
15     <setting enable="false">
16         <type>timeliness</type>
17         <indepRun>50</indepRun>
18         <nThreads>100</nThreads>
19         <threadId>50</threadId>
20         <targetComp>CurrencyConverter</targetComp>
21         <baseDir>/home/conup</baseDir>
22         <ipAddress>114.212.191.22</ipAddress>
23         <rqstInterval>100</rqstInterval>
24         <updateInterval>80</updateInterval>
25     </setting>
26     
27     <setting enable="false">
28         <type>overhead</type>
29         <indepRun>50</indepRun>
30         <nThreads>100</nThreads>
31         <threadId>50</threadId>
32         <targetComp>CurrencyConverter</targetComp>
33         <baseDir>/home/conup</baseDir>
34         <ipAddress>114.212.191.22</ipAddress>
35         <rqstInterval>100</rqstInterval>
36         <updateInterval>80</updateInterval>
37     </setting>
38 </experiment>

ref:

http://stackoverflow.com/questions/5121052/can-we-import-xml-file-into-another-xml-file

你可能感兴趣的:(include)