Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 29th, 2008, 09:55 AM
Mikey_L
Guest
 
Posts: n/a
Default Q: formatting XmlWriter output ?

hi
is it possible to make XmlWriter output with formatting like below ?

I have gotten it working mostly (with XmlWriterSetting.Indent=true). However, I can not find a way to make ">" or "/>" into a new line. MS vcproj file seems to be in below format, so it should be possible ?


<element1
Attr1=""
Quote:
>
<element2>
Attr2=""
/>
</element1>

thanks !


  #2  
Old August 29th, 2008, 12:05 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: Q: formatting XmlWriter output ?

Mikey_L wrote:
Quote:
hi
is it possible to make XmlWriter output with formatting like below ?
>
I have gotten it working mostly (with XmlWriterSetting.Indent=true).
However, I can not find a way to make ">" or "/>" into a new line. MS
vcproj file seems to be in below format, so it should be possible ?
>
>
<element1
Attr1=""
Quote:
>
<element2>
Attr2=""
/>
</element1>
The NewLineOnAttributes setting
http://msdn.microsoft.com/en-us/libr...ttributes.aspx
should help to put each attribute on a new line but I don't think that
helps to put '>' and '/>' on a new line too. To achieve that you would
need your own custom XmlWriter implementation.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles