"
Any ideas?
Cheers
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mike GoldRank #50 · 30.6K reputationPosted Jun 13, 2007, 9:51 AM EDT
Use the InnerXml Property to extract it into a string.
XmlDocument doc = new XmlDocument();
doc.Load(@"c:\myfile.xml");
string contents = doc.InnerXml;
David Isaac19 reputationPosted Jun 14, 2007, 12:16 AM EDT
Mike GoldRank #50 · 30.6K reputationPosted Jun 14, 2007, 7:47 AM EDT
I guess I'm not understanding your question. Are you starting with a file, a string? If you are starting with a string of xml, then you already have a string. I think it would help to understand what you are trying to do.
David Isaac19 reputationPosted Jun 14, 2007, 8:40 AM EDT
Hi,
I am creating a framework that will integrate two applications, this piece of functionality will eventually sit as a web service between the two. Example:- if an invoice is generated in app 1 I want to be able to map it to the invoice fields for the app 2 db....
I have a custom type (invoice) that I wish to serialise and validate against a schema. I also have a server process that will post a string of xml into a database (app2 side) rather than go to the bother of creating an xml file and storing somewhere - then read it back in as a string, It would make it more straight forward if I could just create the string somehow with no IO overhead.