RE: Multiple DataSets in one XML file
From: Ilya Tumanov [MS] (ilyatum_at_online.microsoft.com)
Date: 03/14/05
- Next message: Alex Feinman [MVP]: "Re: [HELP] Reflection"
- Previous message: Sergio Rolanski: "Multiple DataSets in one XML file"
- In reply to: Sergio Rolanski: "Multiple DataSets in one XML file"
- Next in thread: Sergio Rolanski: "Re: Multiple DataSets in one XML file"
- Reply: Sergio Rolanski: "Re: Multiple DataSets in one XML file"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Mar 2005 21:51:17 GMT
Unless you're taking some special care of XML structure, writing several
data sets into one XML would result in malformed XML document.
If you're fixing XML manually, look into ReadXml() overloads with
XmlReadMode argument and XmlReadMode.Fragment mode.
Again, it's up to you to find the right data set start and invoke ReadXml()
on it.
I don't see any advantages of that compared to normal file per data set
solution.
In fact, I do see a major disadvantage which is the need to overwrite the
entire file should you change even one record in one data set.
So I would suggest you don't do it.
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
> From: sergio.rolanski@gmail.com (Sergio Rolanski)
> Newsgroups: microsoft.public.dotnet.framework.compactframework
> Subject: Multiple DataSets in one XML file
> Date: 14 Mar 2005 13:23:55 -0800
> Organization: http://groups.google.com
> Lines: 7
> Message-ID: <7371fd27.0503141323.6c98e343@posting.google.com>
> NNTP-Posting-Host: 200.138.40.128
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 8bit
> X-Trace: posting.google.com 1110835436 8429 127.0.0.1 (14 Mar 2005
21:23:56 GMT)
> X-Complaints-To: groups-abuse@google.com
> NNTP-Posting-Date: Mon, 14 Mar 2005 21:23:56 +0000 (UTC)
> Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
sul.t-online.de!t-online.de!news.glorb.com!postnews.google.com!not-for-mail
> Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.compactframework:73213
> X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
>
> It's very easy to DataSet.WriteXml() multiple dataset to a single xml
> file, but when I want to DataSet.ReadXml() I don't know how to specify
> whick dataset to read. Anybody knows if it's possible to have multiple
> dataset in a single xml file?
>
> Thanks,
> Sergio V. R.
>
- Next message: Alex Feinman [MVP]: "Re: [HELP] Reflection"
- Previous message: Sergio Rolanski: "Multiple DataSets in one XML file"
- In reply to: Sergio Rolanski: "Multiple DataSets in one XML file"
- Next in thread: Sergio Rolanski: "Re: Multiple DataSets in one XML file"
- Reply: Sergio Rolanski: "Re: Multiple DataSets in one XML file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|