0
My c# application gets the idented xml. I need to leave this xml all in one line. How can I do this?
0
My c# application gets the idented xml. I need to leave this xml all in one line. How can I do this?
1
If you get xml by a file:
XDocument document = XDocument.Load("arquivo.xml");
document.Save("arquivo2.xml", SaveOptions.DisableFormatting);
Or if you have xml in a string:
XDocument document = XDocument.Parse(stringXML);
document.Save("arquivo.xml", SaveOptions.DisableFormatting);
0
You can separate lines in array and then concaterate
string xml = dadosdoxml.ToString();
var separar = xml.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries);
string final = string.Join(" ", separar );
hasn’t worked out yet.... but thanks anyway
Browser other questions tagged c# xml digital-signature
You are not signed in. Login or sign up in order to post.
You must edit your question and add more details, describe what error message is being displayed and enter the code of what you tried to do , try to create a Minimum, Complete and Verifiable Example
– stringnome
thanks for the tips...
– novato
Your question is unclear. Try to score correctly so that it is possible to understand, and be more specific when explaining the problem, honestly I could not even understand right.
– user28595
the solution is here: Solution Thank you
– novato
@Rookie, replicate the answer right here, in your question, already marking it as the answer. So some people who do not read English will be able to understand how to solve.
– Uilque Messias