Link to home
Start Free TrialLog in
Avatar of alexmac05
alexmac05Flag for United States of America

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>
ASKER CERTIFIED SOLUTION
Avatar of technofile
technofile
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alexmac05

ASKER

i know. but what can I do?

I just pushed back to the client asking why they want these things.

I'll see what they say.
This worked:

myXmlTextWriter.WriteRaw("\n");

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.