Remove empty/blanks elements in collection of XML nodes

前端 未结 3 1081
野趣味
野趣味 2020-12-03 12:08

I have an XML document like this:


    
        400
             


        
3条回答
  •  青春惊慌失措
    2020-12-03 12:10

    In VB in case I need to find it again:

    doc.Descendants().Where(Function(e) String.IsNullOrEmpty(e.Value)).Remove()
    

提交回复
热议问题