Remove Empty Nodes from XML File

Dim emptyXmlNodeList as XmlNodeList
emptyXmlNodeList=xmlDoc.SelectNodes("//*[not(descendant::text() [normalize-space()])]")
Dim emptyXmlNode as Xmlnode
    For each emptyXmlNode in emptyXmlNodeList
        emptyXmlNode.ParentNode.removeChild(emptyXmlNode)
    Next
xmlDoc.Save.MapPath(myXmlFile)