I want to save The whole content of XML file to a string or stringbuilder. Please let me know how can i achive that??
My Function needs to copy or Save a XML file content Completely to string or stringbuilder.
It is External Content(XML File).After that I need to change the Content(onf field ) of the xml file Can i achive it through C#. please let me know.
I Have following content in XML format , i want to put into one string and pass that to another Function in order to achive my Work.
<wsa:Address xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">
<wsman:ResourceURI>http://schema.unisys.com/wbem/wscim/1/cim- </wsa:ReferenceParameters>
</p:Source>
</p:INPUT>";
--------------------------------------------------
Regards,
Channaa
Is the question like - Reading the XML file, changing element / attribute and saving it back ?. If yes, then there are enormous amount of samples available. Just search it on. Something likeXDocument.Load(@"C:\MyFile.xml");