一个xml文件能否"包含"另一个xml文件(不是xsd文件),就像C语言的#include一样?解决思路
一个xml文件能否"包含"另一个xml文件(不是xsd文件),就像C语言的#include一样?
能做到吗?
------解决方案--------------------
你可以使用xi:include
http://msdn.microsoft.com/en-us/library/aa302291.aspx
例如
能做到吗?
------解决方案--------------------
你可以使用xi:include
http://msdn.microsoft.com/en-us/library/aa302291.aspx
例如
- XML code
<?xml version="1.0"?> <book xmlns:xi="http://www.w3.org/2001/XInclude"> <title>The Wit and Wisdom of George W. Bush</title> <xi:include href="http://www.whitehouse.gov/malapropisms.xml"/> <xi:include href="http://www.whitehouse.gov/mispronunciations.xml"/> <xi:include href="http://www.whitehouse.gov/madeupwords.xml"/> </book>
------解决方案--------------------
如果是用于XSLT 的话可用document()方法