add xml version line before xml file root node

G

Guest

Hi, All,

I try to add xml version line(<?xml version="1.0" encoding="utf-8"?>) before
xml file AutoData root node in the following file

<AutoData >
<Table1>
<Data1> 10 </Data1>
<Data2> 20 </Data2>
<Data3> 40 </Data3>
<Table1>
</AutoData>

So finally the file is like this:

(<?xml version="1.0" encoding="utf-8"?>)
<AutoData >
<Table1>
<Data1> 10 </Data1>
<Data2> 20 </Data2>
<Data3> 40 </Data3>
<Table1>
</AutoData>

Anyone knows how to add it?

Thanks
Martin
 
M

Martin Honnen

martin1 said:
I try to add xml version line(<?xml version="1.0" encoding="utf-8"?>) before
xml file AutoData root node in the following file

When you serialize/save the XML document use the proper
XmlWriterSettings with .NET 2.0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top