我可以将 XInclude 与 Java 1.5 XML 属性一起使用吗?
Since JDK 1.5 Properties can be loaded from a simple XML file (see IBM article). Is it possible to use XInclude in one of these XML properties files to compose multiple files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,java.util.Properties使用DOM来解析xml属性文件,并且DOM确实支持XInclude。但它默认是关闭的。也许您可以指定一个系统属性来打开它(但我不知道)。
另一种可能性是尝试包含 DTD:
这应该可行。
As far as I know, java.util.Properties uses DOM to parse xml properties files, and DOM does support XInclude. But it's turned off by default. Maybe you can specify a system property to turn it on (but I don't know).
Another possibility is to try with DTD inclusion:
This should work.