开发者

including xml file in another xml file

In PHP, it's possible开发者_StackOverflow中文版 to include 1 php file in another php.

Is there something similar for xml files.

The xml file is a database schema (for Propel), and some tables I plan to use in more than one project. I'd prefer to create 1 xml file and include when needed.


XML is a tree model - so you'll need to specify at least on which level you want to insert the snippet. A kind of workaround for XML includes with PHP is presented in this forum post:

  • http://webprocafe.com/javascript-libraries/2964-can-i-include-extendible-markup-language-file-within-another-extendible-markup-language-file.html#post18163

Snippet copied for reference:

<?php header('Content-Type:text/xml'); ?>
<markers>
<?php include("moredata3.xml"); ?>
<?php include("moredata2.xml"); ?>
</markers>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜