Link to home
Start Free TrialLog in
Avatar of ksfok
ksfok

asked on

.NET XMLDoccument handling in C#

Given the below C# code using VS2005:
       XmlDocument xn = new XmlDocument();

Please advise the remaini ng code to accomplish the following:
1) Fill xn with an XML file and make it a useable XML document ready to be sent to a WS
2) Do the same as (1) with a string storing the same XML data.

Thanks.
Avatar of JimBrandley
JimBrandley
Flag of United States of America image

To load from a file:
xn.Load(myFilePath);

To load from a string containg XML:
xn.LoadXml( myXMLstring );

Jim
Avatar of ksfok
ksfok

ASKER

How would I handle "xn.Load(myFilePath);" if an XML file is placed under app_data folder?
ASKER CERTIFIED SOLUTION
Avatar of JimBrandley
JimBrandley
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial