如何获取 XML 元素的数量并在 Quartz Composer 中使用它?
我有一个 Quartz Composer 文档,我正在尝试编辑它,但由于这是我第一次深入 QC,所以我几乎不知道我在做什么。
该任务可能很简单:有一个 XML 导入器和一个迭代器。现在我想使用导入的 XML 中的元素数量作为迭代数量。
谁能帮助我实现这个目标?
谢谢,
托马斯
I have a Quartz Composer document which I'm trying to edit but since this is my first dive into QC, I have little to no clue what I'm doing.
The task could be simple: There is an XML Importer and an Iterator. Now I want to use the amount of elements in the imported XML as amount of Iterations.
Can anyone help me achieve this??
Thanks,
thomas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
XML Importer
输出 QC 结构。您可以对结构执行一些内置操作,例如Structure Count
补丁。如果您想要计算顶层内 XML 元素的数量,请将
XML Importer
馈送到Structure Count
中,并将其馈送到Iterations
中。在迭代器内部,您可能希望将
Iterator Variables
中的Index
馈送到Structure Index Member
补丁中,以提取结构的一个元素对于每次迭代。XML Importer
outputs a QC Structure. There are a few built-in operations you can perform on Structures, such as theStructure Count
patch.If you want to count the number of XML elements inside the top level, feed
XML Importer
intoStructure Count
, and feed that intoIterations
.Inside the iterator, you'll probably want to feed
Index
fromIterator Variables
into theStructure Index Member
patch, to extract one element of the Structure for each iteration.