Root element is missing

前端 未结 6 2001
离开以前
离开以前 2020-12-06 05:52

I am reading xml from xxx URl but i am getting error as Root element is missing.

My code to read xml response is as follows:

  XmlDocument doc = new          


        
6条回答
  •  清歌不尽
    2020-12-06 06:10

    Make sure you XML looks like this:

    
    
    ...
    
    

    Also, a blank XML file will return the same Root elements is missing exception. Each XML file must have a root element / node which encloses all the other elements.

提交回复
热议问题