如何使用 OmniXML 删除子节点?
我想删除 rowpath
部分中带有 pathid="2"
的行...
<?xml version="1.0" encoding="utf-8"?>
<LostPath Condition="Active" Selected="train.exe" FullPathOfSelected="D:\mygames\arcade\train\" Selected="0">
<rowdir Name="train.exe" GamePath="D:\mygames\arcade\train\" Selected="0" />
<rowdir Name="othelo.exe" GamePath="D:\mygames\arcade\othello\" Selected="3"/>
<rowpath Name="train.exe" PathId="1" LevelPath="D:\mygames\arcade\train\levelpack1" levelsFound="27" />
<rowpath Name="train.exe" PathId="2" LevelPath="D:\mygames\arcade\train\levelpack21" levelsFound="19" />
<rowpath Name="othelo.exe" PathId="0" LevelPath="D:\mygames\arcade\othelo\levelpack1" levelsFound="11" />
</LostPath>
我该怎么做?
I'd like to delete the line with pathid="2"
in the rowpath
section...
<?xml version="1.0" encoding="utf-8"?>
<LostPath Condition="Active" Selected="train.exe" FullPathOfSelected="D:\mygames\arcade\train\" Selected="0">
<rowdir Name="train.exe" GamePath="D:\mygames\arcade\train\" Selected="0" />
<rowdir Name="othelo.exe" GamePath="D:\mygames\arcade\othello\" Selected="3"/>
<rowpath Name="train.exe" PathId="1" LevelPath="D:\mygames\arcade\train\levelpack1" levelsFound="27" />
<rowpath Name="train.exe" PathId="2" LevelPath="D:\mygames\arcade\train\levelpack21" levelsFound="19" />
<rowpath Name="othelo.exe" PathId="0" LevelPath="D:\mygames\arcade\othelo\levelpack1" levelsFound="11" />
</LostPath>
How can I do that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用这个。
Try to use this.
有几种方法如何删除具有相同属性值的所有节点。这是其中之一。但请注意,这篇文章并没有回答这个问题。它应该作为另一个问题来问。
There are few ways how to delete all nodes with the same attribute value. Here's one of them. But please note, this post doesn't answer this question. It should be asked as another question.