XML XInclude - 通配符
我有一个目录层次结构,并且希望使用 XInclude 包含适合特定模式的所有 XML 文件。结构如下图所示。
Book/
├── book.xml
└── Chapter
└── page01.xml
└── page02.xml
└── page03.xml
└── page04.xml
我的问题是:
是否有一种方法可以指定通配符来选择一堆文件,而不是只选择指定的文件?我尝试了下面的代码,但它似乎无效。
<书名=“书名”源=“/home/phiri/Book/book.xml” xmlns:xi="http://www.w3.org/2001/XInclude"> <章节> <标题>标题 <评论>评论 <故事页>001-100
是否有任何其他替代的基于 XML 的解决方案我可以使用而不是 XInclude?
I have a directory hierarchy and would want to include all XML files that fit a particular pattern using XInclude. The structure is as show below.
Book/
├── book.xml
└── Chapter
└── page01.xml
└── page02.xml
└── page03.xml
└── page04.xml
My questions are:
Is there a way of specifying wild card characters to pick a bunch of files as opposed to picking only specified files? I tried out the code below and it appears it's not valid.
<book name="bookname" source="/home/phiri/Book/book.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> <chapter> <title>Title</title> <comments>Comments</comments> <storypages>001-100</storypages> <xi:include href="chapter/page*.xml"/> </chapter> </book>
Is there any other alternate XML based solution I could use as opposed to XInclude?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论