Hi Jaime,
Does your dataset generated from a xml file or from a datatable of database?
I think if your dataset generates from database, the WriteXml method will
not generate the namespace prefix.
However, you also can use the DataSet or Datatable's Namespace, Prefix
property to add to it.
So I think you also can set Namespace, Prefix property to String.Empty to
get what your want.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "Jaime" <j.******@haysd t.co.uk>
| References: <ut************ **@TK2MSFTNGP10 .phx.gbl>
<uQ************ *@TK2MSFTNGP11. phx.gbl>
| Subject: Re: DataSet save to XML with a d2p1:
| Date: Wed, 29 Oct 2003 13:47:40 -0000
| Lines: 51
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uS************ **@TK2MSFTNGP10 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: 193.195.51.178
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1950 44
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Thanks for the anwser but the namespace its not in the xsd from which I
| created the dataset in the first place.
| and the xsd would let me load the xml back to the dataset.
|
| So I still have the problem
|
| Thanks
|
| any clarification is welcome
|
| jaime
|
|
|
| "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in
| message news:uQ******** *****@TK2MSFTNG P11.phx.gbl...
| > Jaime,
| >
| > You can't just do that. If the namespace was written to the data
set,
| > then it will certainly be needed to validate the contents when you read
| the
| > data set back in.
| >
| > Why do you want to get rid of it? I can understand for efficiency,
| but
| > if you need to get the data back into a dataset (don't say you never
will,
| > those things have a tendency to come back to haunt you), then you will
| > prevent yourself from doing so.
| >
| > Hope this helps.
| >
| >
| > --
| > - Nicholas Paldino [.NET/C# MVP]
| > -
mv*@spam.guard. caspershouse.co m
| >
| > "Jaime" <j.******@haysd t.co.uk> wrote in message
| > news:ut******** ******@TK2MSFTN GP10.phx.gbl...
| > > I have to save a dataset to xml and for efficiency I like to get rid
of
| > the
| > > namespace prefix d2p1: can any one help
| > >
| > > thanks
| > >
| > > jaime
| > >
| > >
| >
| >
|
|
|