Orel Gabay
Orel Gabay

Reputation: 35

Convert node section into one line

i have xml document with a lot of items like this:

 <item>
    <key>
       <unsignedShort>x</unsignedShort>
    </key>
    <value>
       <unsignedShort>y</unsignedShort>
    </value>
 </item>


 <item>
......

now i want that every section of it will look like this:

<item><key><unsignedShort>x</unsignedShort></key><value><unsignedShort>y</unsignedShort></value></item>

Upvotes: 0

Views: 85

Answers (1)

moribvndvs
moribvndvs

Reputation: 42497

You would have to implement your own XmlWriter. XmlTextWriter allows you to use an unindented format, but that would result in the entire document being on one line. So, yeah, you'd have to roll your own, unless you're OK with the entire document sitting on one line.

Upvotes: 1

Related Questions