You declare the entity like this:
<!ENTITY otherFile SYSTEM "otherFile.xml">
Then you reference it like this:
&otherFile;
A complete example:
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE doc [
<!ENTITY otherFile SYSTEM "otherFile.xml">
]>
<doc>
<foo>
<bar>&otherFile;</bar>
</foo>
</doc>
When the XML parser reads the file, it will expand the entity reference and include the referenced XML file as part of the content.
If the "otherFile.xml" contained: <baz>this is my content</baz>
Then the XML would be evaluated and "seen" by an XML parser as:
<?xml version="1.0" standalone="no" ?>
<doc>
<foo>
<bar><baz>this is my content</baz></bar>
</foo>
</doc>
A few references that might be helpful:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…