Hello. There is an XML document that is parsed with the XDocument.Parse() method. Then you need to translate it into a data type ( string ). I make the front method: XDocument.Parse().ToString() and output it to the Console.WriteLine() console, but this is displayed:
<iq to="masterserver@k01/custom_server" id="uid00000068" type="get" from="5@k01/Client" xmlns="jabber:client"> <query xmlns="urn:cryonline:k01"> <setcurrentclass current="4" /> </query> </iq> Data is transferred from the server to the client, and this XML style is preserved.
But this document needs to lose its style:
<iq to="masterserver@k01/custom_server" id="uid00000068" type="get" from="5@k01/Client" xmlns="jabber:client"><query xmlns="urn:cryonline:k01"><setcurrentclass current="4" /></query></iq> How can you do this?
new Regex(@"\r?\n\s*").Replace(text, "")? - VladD pm