Im试图将个人节点从母子中删除,我尝试了Remove
方法,但似乎还在使用。 如何做到这一点? 这难道是一种ug吗?
Sub Main()
Dim xml =
<?xml version="1.0" encoding="utf-8"?>
<Products>
<Product name="ABC-1" link="http://www.site.com/1"/>
<Product name="ABC-2" link="http://www.site.com/2"/>
<Product name="ABC-3" link="http://www.site.com/3"/>
</Products>
Dim products = xml.Root.<Product>
works - uncomment
products.Remove()
Doesn t work
For Each product In products
product.Remove()
Next
xml.Save(FailedFilename)
End Sub