All pastes #938821 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-11 21:39 UTC
rendered paste body
Dim doc As New XmlDocument()
doc.Load(filename)

Dim mediaNodes As XmlNodeList = doc.Select("//media") 'find media element anywhere in the document using an XPath query

For Each node As XmlNode In mediaNodes
    node.ParentNode.RemoveChild(node) 'remove this node from the it's parent
Next