使用 Coldfusion 查找所有 XML 节点
我想使用 Coldfusion 提取名称为“person”的所有节点(父/子),并将属性“image1”的值设置为 NULL
<person image1="img1.jpg" image2="img2.jpg">
<person image1="img3.jpg" image2="img4.jpg" />
<person image1="img5.jpg" image2="img6.jpg" />
</person>
I want to extract all the nodes(parent/children) with name "person" using coldfusion and make the value of the attribute "image1" as NULL
<person image1="img1.jpg" image2="img2.jpg">
<person image1="img3.jpg" image2="img4.jpg" />
<person image1="img5.jpg" image2="img6.jpg" />
</person>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是使用递归解决您的(编辑的)问题的解决方案:
希望有帮助!
Here is a solution to your (edited) question using recursion:
Hope that helps!