session101 Posted February 8, 2007 Posted February 8, 2007 (edited) I created a config with the location of my xml file: <add key="positionXML" value = "C:temp\PositionMsg.xml" /> When I try to load the xml file into my C# code, I am doing the following: XmlDocument objDoc=new XmlDocument(); objDoc.LoadXml(ConfigurationSettings.AppSettings["positionXML"]); What should I do to load the XML file and get the data elements in the XML? TIA. Edited February 8, 2007 by session101 Quote
LostProgrammer Posted February 8, 2007 Posted February 8, 2007 load not loadxml loadxml uses a string of xml to load the document. what you want is a stream. use xmldocument.load(stream) - create a filestream using the path and then call load. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.