问题
Is there a way wherein an xml document can refer to a variable/element which is defined in some other xml file on the same machine?
回答1:
Sure, like this:
outer.xml:
<!DOCTYPE outer [
<!ELEMENT outer ANY>
<!ENTITY inner SYSTEM "inner.xml" >
]>
<outer>
&inner;
&inner;
</outer>
inner.xml
<inner/>
来源:https://stackoverflow.com/questions/10780482/xml-document-having-external-references