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" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| 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: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 193.195.51.178
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:195044
| X-Tomcat-NG: microsoft.public.dotnet.languages.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
|
|
|
in
| message | > 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]
| > - (e-mail address removed)
| >
| > | > > 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
| > >
| > >
| >
| >
|
|
|