Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 23, 2013 09:24 AM by DarrellNorton
Jan 23, 2013 07:54 AM|LINK
I am using XDocument to read an XML file and i am getting the follwing error-
Non white space characters cannot be added to content.
i hav written following code to load an XML-
XDocument document =
ANy help will be appreciated.
Jan 23, 2013 09:24 AM|LINK
You cannot load a file like that into an XDocument. That works for the XmlDocument class, but not XDocument.
You can load a file using the Load method, like this:
XDocument document = XDocument.Load("c:\Work\file.xml")