alexmac05
asked on
How do i write a newline to my xml output file?
In my xml output file it is a requirement that there be a new line between my encoding element and my first element. How do I insert this using C#.NET VS2008?
<?xml version="1.0" encoding="UTF-8"?>
<MessageTemplateRoot>
... the rest of the xml file
</MessageTemplateRoot>
<?xml version="1.0" encoding="UTF-8"?>
<MessageTemplateRoot>
... the rest of the xml file
</MessageTemplateRoot>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This worked:
myXmlTextWriter.WriteRaw(" \n");
myXmlTextWriter.WriteRaw("
ASKER
The answer given helped me to push back to the client and know that I was correct in thinking that these sorts of requests for xml files is not correct. I did ths.
ASKER
I just pushed back to the client asking why they want these things.
I'll see what they say.