By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,812 Members | 1,647 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,812 IT Pros & Developers. It's quick & easy.

fastest way to ReadXmlSchema, ReadXml and WriteXml

P: n/a
Hi,

I should use XML to synchronize the data from different (VB.NET)
applications, and I was just wondering which Overloads of these functions
( ReadXmlSchema, ReadXml and WriteXml) goes the fastest? I don't think the
ReadXMLSchema would give a lot of difference, but maybe the overlaods of
ReadXml and WriteXml will. Especially with larges files/datatables...

Should I use the IO.Stream? The XmlReader/XmlWriter?

Any help would be really appreciated!

Thanks a lot in advance,

Pieter
The overloads:

Reads the XML schema from the specified Stream into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(Stream)
Reads the XML schema from the specified file into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(String)
Reads the XML schema from the specified TextReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(TextReader)
Reads the XML schema from the specified XmlReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(XmlReader)

Reads XML schema and data into the DataSet using the specified
System.IO.Stream.
[Visual Basic] Overloads Public Function ReadXml(Stream) As XmlReadMode
Reads XML schema and data into the DataSet using the specified file.
[Visual Basic] Overloads Public Function ReadXml(String) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.TextReader.
[Visual Basic] Overloads Public Function ReadXml(TextReader) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlReader.
[Visual Basic] Overloads Public Function ReadXml(XmlReader) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.Stream and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(Stream, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified file and
XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(String, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.TextReader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(TextReader, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlReader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(XmlReader, XmlReadMode) As
XmlReadMode
Writes the current data for the DataSet using the specified
System.IO.Stream.
[Visual Basic] Overloads Public Sub WriteXml(Stream)
Writes the current data for the DataSet to the specified file.
[Visual Basic] Overloads Public Sub WriteXml(String)
Writes the current data for the DataSet using the specified TextWriter.
[Visual Basic] Overloads Public Sub WriteXml(TextWriter)
Writes the current data for the DataSet to the specified XmlWriter.
[Visual Basic] Overloads Public Sub WriteXml(XmlWriter)
Writes the current data, and optionally the schema, for the DataSet using
the specified System.IO.Stream and XmlWriteMode. To write the schema, set
the value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(Stream, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet to the
specified file using the specified XmlWriteMode. To write the schema, set
the value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(String, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet using
the specified TextWriter and XmlWriteMode. To write the schema, set the
value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(TextWriter, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet using
the specified XmlWriter and XmlWriteMode. To write the schema, set the value
for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(XmlWriter, XmlWriteMode)

Nov 12 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
The easiest way to find out is try them.
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:42***********************@news.skynet.be...
Hi,

I should use XML to synchronize the data from different (VB.NET)
applications, and I was just wondering which Overloads of these functions
( ReadXmlSchema, ReadXml and WriteXml) goes the fastest? I don't think the
ReadXMLSchema would give a lot of difference, but maybe the overlaods of
ReadXml and WriteXml will. Especially with larges files/datatables...

Should I use the IO.Stream? The XmlReader/XmlWriter?

Any help would be really appreciated!

Thanks a lot in advance,

Pieter
The overloads:

Reads the XML schema from the specified Stream into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(Stream)
Reads the XML schema from the specified file into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(String)
Reads the XML schema from the specified TextReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(TextReader)
Reads the XML schema from the specified XmlReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(XmlReader)

Reads XML schema and data into the DataSet using the specified
System.IO.Stream.
[Visual Basic] Overloads Public Function ReadXml(Stream) As XmlReadMode
Reads XML schema and data into the DataSet using the specified file.
[Visual Basic] Overloads Public Function ReadXml(String) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.TextReader.
[Visual Basic] Overloads Public Function ReadXml(TextReader) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlReader.
[Visual Basic] Overloads Public Function ReadXml(XmlReader) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.Stream and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(Stream, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified file and
XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(String, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.TextReader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(TextReader, XmlReadMode)
As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlReader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(XmlReader, XmlReadMode)
As
XmlReadMode
Writes the current data for the DataSet using the specified
System.IO.Stream.
[Visual Basic] Overloads Public Sub WriteXml(Stream)
Writes the current data for the DataSet to the specified file.
[Visual Basic] Overloads Public Sub WriteXml(String)
Writes the current data for the DataSet using the specified TextWriter.
[Visual Basic] Overloads Public Sub WriteXml(TextWriter)
Writes the current data for the DataSet to the specified XmlWriter.
[Visual Basic] Overloads Public Sub WriteXml(XmlWriter)
Writes the current data, and optionally the schema, for the DataSet using
the specified System.IO.Stream and XmlWriteMode. To write the schema, set
the value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(Stream, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet to the
specified file using the specified XmlWriteMode. To write the schema, set
the value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(String, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet using
the specified TextWriter and XmlWriteMode. To write the schema, set the
value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(TextWriter, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet using
the specified XmlWriter and XmlWriteMode. To write the schema, set the
value
for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(XmlWriter, XmlWriteMode)

Nov 12 '05 #2

P: n/a
Thanks, you didn't sleep too well thisn ight I guess? ;-)

It would jsut be nice if anybody couldgive me tha right answer :-) I think
the "Overloads Public Function ReadXml(XmlReader, XmlReadMode) As
XmlReadMode" is the fastets, ot maybe the one without the XmlReadMode, and
using a XmlTextReader.
But there are different ways to open the XmlTextReader, and different ways
for the xmlReadMode, etc...

So this makes the total to hundreds of ways to do it. so testing one after
another would take to much time. I just hink there mya be a 'right' solution
out there...

Pieter
"Stephany Young" <noone@localhost> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
The easiest way to find out is try them.
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:42***********************@news.skynet.be...
Hi,

I should use XML to synchronize the data from different (VB.NET)
applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the fastest? I don't think the ReadXMLSchema would give a lot of difference, but maybe the overlaods of
ReadXml and WriteXml will. Especially with larges files/datatables...

Should I use the IO.Stream? The XmlReader/XmlWriter?

Any help would be really appreciated!

Thanks a lot in advance,

Pieter
The overloads:

Reads the XML schema from the specified Stream into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(Stream)
Reads the XML schema from the specified file into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(String)
Reads the XML schema from the specified TextReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(TextReader)
Reads the XML schema from the specified XmlReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(XmlReader)

Reads XML schema and data into the DataSet using the specified
System.IO.Stream.
[Visual Basic] Overloads Public Function ReadXml(Stream) As XmlReadMode
Reads XML schema and data into the DataSet using the specified file.
[Visual Basic] Overloads Public Function ReadXml(String) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.TextReader.
[Visual Basic] Overloads Public Function ReadXml(TextReader) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlReader.
[Visual Basic] Overloads Public Function ReadXml(XmlReader) As XmlReadMode Reads XML schema and data into the DataSet using the specified
System.IO.Stream and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(Stream, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified file and
XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(String, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.TextReader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(TextReader, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlReader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(XmlReader, XmlReadMode)
As
XmlReadMode
Writes the current data for the DataSet using the specified
System.IO.Stream.
[Visual Basic] Overloads Public Sub WriteXml(Stream)
Writes the current data for the DataSet to the specified file.
[Visual Basic] Overloads Public Sub WriteXml(String)
Writes the current data for the DataSet using the specified TextWriter.
[Visual Basic] Overloads Public Sub WriteXml(TextWriter)
Writes the current data for the DataSet to the specified XmlWriter.
[Visual Basic] Overloads Public Sub WriteXml(XmlWriter)
Writes the current data, and optionally the schema, for the DataSet using the specified System.IO.Stream and XmlWriteMode. To write the schema, set the value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(Stream, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet to the specified file using the specified XmlWriteMode. To write the schema, set the value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(String, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet using the specified TextWriter and XmlWriteMode. To write the schema, set the
value for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(TextWriter, XmlWriteMode)
Writes the current data, and optionally the schema, for the DataSet using the specified XmlWriter and XmlWriteMode. To write the schema, set the
value
for the XMLWriteMode parameter to WriteSchema.
[Visual Basic] Overloads Public Sub WriteXml(XmlWriter, XmlWriteMode)


Nov 12 '05 #3

P: n/a
So you expect others to try it out for you and report back?

If you are too lazy to try write a few lines of code and try it for
yourself, then you aren't going to learn much.
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:42*********************@news.skynet.be...
Thanks, you didn't sleep too well thisn ight I guess? ;-)

It would jsut be nice if anybody couldgive me tha right answer :-) I think
the "Overloads Public Function ReadXml(XmlReader, XmlReadMode) As
XmlReadMode" is the fastets, ot maybe the one without the XmlReadMode, and
using a XmlTextReader.
But there are different ways to open the XmlTextReader, and different ways
for the xmlReadMode, etc...

So this makes the total to hundreds of ways to do it. so testing one after
another would take to much time. I just hink there mya be a 'right'
solution
out there...

Pieter
"Stephany Young" <noone@localhost> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
The easiest way to find out is try them.
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:42***********************@news.skynet.be...
> Hi,
>
> I should use XML to synchronize the data from different (VB.NET)
> applications, and I was just wondering which Overloads of these functions > ( ReadXmlSchema, ReadXml and WriteXml) goes the fastest? I don't think the > ReadXMLSchema would give a lot of difference, but maybe the overlaods
> of
> ReadXml and WriteXml will. Especially with larges files/datatables...
>
> Should I use the IO.Stream? The XmlReader/XmlWriter?
>
> Any help would be really appreciated!
>
> Thanks a lot in advance,
>
> Pieter
>
>
> The overloads:
>
> Reads the XML schema from the specified Stream into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(Stream)
> Reads the XML schema from the specified file into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(String)
> Reads the XML schema from the specified TextReader into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(TextReader)
> Reads the XML schema from the specified XmlReader into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(XmlReader)
>
> Reads XML schema and data into the DataSet using the specified
> System.IO.Stream.
> [Visual Basic] Overloads Public Function ReadXml(Stream) As XmlReadMode
> Reads XML schema and data into the DataSet using the specified file.
> [Visual Basic] Overloads Public Function ReadXml(String) As XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.IO.TextReader.
> [Visual Basic] Overloads Public Function ReadXml(TextReader) As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.Xml.XmlReader.
> [Visual Basic] Overloads Public Function ReadXml(XmlReader) As XmlReadMode > Reads XML schema and data into the DataSet using the specified
> System.IO.Stream and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(Stream, XmlReadMode)
> As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified file and
> XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(String, XmlReadMode)
> As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.IO.TextReader and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(TextReader, XmlReadMode) > As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.Xml.XmlReader and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(XmlReader,
> XmlReadMode)
> As
> XmlReadMode
>
>
> Writes the current data for the DataSet using the specified
> System.IO.Stream.
> [Visual Basic] Overloads Public Sub WriteXml(Stream)
> Writes the current data for the DataSet to the specified file.
> [Visual Basic] Overloads Public Sub WriteXml(String)
> Writes the current data for the DataSet using the specified TextWriter.
> [Visual Basic] Overloads Public Sub WriteXml(TextWriter)
> Writes the current data for the DataSet to the specified XmlWriter.
> [Visual Basic] Overloads Public Sub WriteXml(XmlWriter)
> Writes the current data, and optionally the schema, for the DataSet using > the specified System.IO.Stream and XmlWriteMode. To write the schema, set > the value for the XMLWriteMode parameter to WriteSchema.
> [Visual Basic] Overloads Public Sub WriteXml(Stream, XmlWriteMode)
> Writes the current data, and optionally the schema, for the DataSet to the > specified file using the specified XmlWriteMode. To write the schema, set > the value for the XMLWriteMode parameter to WriteSchema.
> [Visual Basic] Overloads Public Sub WriteXml(String, XmlWriteMode)
> Writes the current data, and optionally the schema, for the DataSet using > the specified TextWriter and XmlWriteMode. To write the schema, set the
> value for the XMLWriteMode parameter to WriteSchema.
> [Visual Basic] Overloads Public Sub WriteXml(TextWriter, XmlWriteMode)
> Writes the current data, and optionally the schema, for the DataSet using > the specified XmlWriter and XmlWriteMode. To write the schema, set the
> value
> for the XMLWriteMode parameter to WriteSchema.
> [Visual Basic] Overloads Public Sub WriteXml(XmlWriter, XmlWriteMode)
>
>
>



Nov 12 '05 #4

P: n/a
Hehehe :-) You really didn't sleep too wel did you? :-)
So you are convinced that evrybody who's asking something on a newsgroup is
just too lazy to search him/herself, and hopes somebody else is going to
work for him/her? I think that says a lot more about you than it does about
me...
:-)

Nevertheless, I don't think that's the appropriate place to have discussions
like this, so it would still be fine if somebody could confirm/reject my
supposition?

thanks,

Pieter
"Stephany Young" <noone@localhost> wrote in message
news:O9**************@TK2MSFTNGP09.phx.gbl...
So you expect others to try it out for you and report back?

If you are too lazy to try write a few lines of code and try it for
yourself, then you aren't going to learn much.
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:42*********************@news.skynet.be...
Thanks, you didn't sleep too well thisn ight I guess? ;-)

It would jsut be nice if anybody couldgive me tha right answer :-) I think the "Overloads Public Function ReadXml(XmlReader, XmlReadMode) As
XmlReadMode" is the fastets, ot maybe the one without the XmlReadMode, and using a XmlTextReader.
But there are different ways to open the XmlTextReader, and different ways for the xmlReadMode, etc...

So this makes the total to hundreds of ways to do it. so testing one after another would take to much time. I just hink there mya be a 'right'
solution
out there...

Pieter
"Stephany Young" <noone@localhost> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
The easiest way to find out is try them.
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:42***********************@news.skynet.be...
> Hi,
>
> I should use XML to synchronize the data from different (VB.NET)
> applications, and I was just wondering which Overloads of these

functions
> ( ReadXmlSchema, ReadXml and WriteXml) goes the fastest? I don't think
the
> ReadXMLSchema would give a lot of difference, but maybe the overlaods
> of
> ReadXml and WriteXml will. Especially with larges files/datatables...
>
> Should I use the IO.Stream? The XmlReader/XmlWriter?
>
> Any help would be really appreciated!
>
> Thanks a lot in advance,
>
> Pieter
>
>
> The overloads:
>
> Reads the XML schema from the specified Stream into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(Stream)
> Reads the XML schema from the specified file into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(String)
> Reads the XML schema from the specified TextReader into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(TextReader)
> Reads the XML schema from the specified XmlReader into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(XmlReader)
>
> Reads XML schema and data into the DataSet using the specified
> System.IO.Stream.
> [Visual Basic] Overloads Public Function ReadXml(Stream) As
XmlReadMode > Reads XML schema and data into the DataSet using the specified file.
> [Visual Basic] Overloads Public Function ReadXml(String) As XmlReadMode > Reads XML schema and data into the DataSet using the specified
> System.IO.TextReader.
> [Visual Basic] Overloads Public Function ReadXml(TextReader) As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.Xml.XmlReader.
> [Visual Basic] Overloads Public Function ReadXml(XmlReader) As

XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.IO.Stream and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(Stream, XmlReadMode)
> As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified file a nd > XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(String, XmlReadMode)
> As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.IO.TextReader and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(TextReader,

XmlReadMode)
> As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.Xml.XmlReader and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(XmlReader,
> XmlReadMode)
> As
> XmlReadMode
>
>
> Writes the current data for the DataSet using the specified
> System.IO.Stream.
> [Visual Basic] Overloads Public Sub WriteXml(Stream)
> Writes the current data for the DataSet to the specified file.
> [Visual Basic] Overloads Public Sub WriteXml(String)
> Writes the current data for the DataSet using the specified TextWriter. > [Visual Basic] Overloads Public Sub WriteXml(TextWriter)
> Writes the current data for the DataSet to the specified XmlWriter.
> [Visual Basic] Overloads Public Sub WriteXml(XmlWriter)
> Writes the current data, and optionally the schema, for the DataSet

using
> the specified System.IO.Stream and XmlWriteMode. To write the schema,

set
> the value for the XMLWriteMode parameter to WriteSchema.
> [Visual Basic] Overloads Public Sub WriteXml(Stream, XmlWriteMode)
> Writes the current data, and optionally the schema, for the DataSet to the
> specified file using the specified XmlWriteMode. To write the schema,

set
> the value for the XMLWriteMode parameter to WriteSchema.
> [Visual Basic] Overloads Public Sub WriteXml(String, XmlWriteMode)
> Writes the current data, and optionally the schema, for the DataSet

using
> the specified TextWriter and XmlWriteMode. To write the schema, set

the > value for the XMLWriteMode parameter to WriteSchema.
> [Visual Basic] Overloads Public Sub WriteXml(TextWriter, XmlWriteMode) > Writes the current data, and optionally the schema, for the DataSet

using
> the specified XmlWriter and XmlWriteMode. To write the schema, set the > value
> for the XMLWriteMode parameter to WriteSchema.
> [Visual Basic] Overloads Public Sub WriteXml(XmlWriter, XmlWriteMode)
>
>
>



Nov 12 '05 #5

P: n/a
Pieter,

Although I have as well no answer, what is your source I think that that is
something that you should tell as well?

Internet, DiskFile etc.

Cor
Nov 12 '05 #6

P: n/a
Hi Cor,

Everything allright?
It should be fore the interfacte between a File and a Dataset...
So you have a DataSet, you put it in an Xml-file, send it, and the other
partie just reads ir backin a DataSet.

Pieter

"Cor Ligthert" <no************@planet.nl> wrote in message
news:uR**************@TK2MSFTNGP12.phx.gbl...
Pieter,

Although I have as well no answer, what is your source I think that that is something that you should tell as well?

Internet, DiskFile etc.

Cor

Nov 12 '05 #7

P: n/a
Pieter,

You understand it probably,

I never took any check to see how fast it is.
I do maximum

\\\
ds.xmlwrite("filepath", XmlWriteMode.WriteSchema)
///
and

\\\
ds.xmlread("filepath")
///

By disk IO, do I never think what is fast, most time is consumed by that
disk itself.

Just my thought,

Cor
Nov 12 '05 #8

P: n/a
One point I found out recently is that if you are using a
XmlValidatingReader and you are processing more than one file of the same
type, then it's definitely worthwhile building an XmlSchemaCollection and
passing that to the validating reader.

In my test suite, this saved over 60Mb of memory allocations.

Paul

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
Pieter,

You understand it probably,

I never took any check to see how fast it is.
I do maximum

\\\
ds.xmlwrite("filepath", XmlWriteMode.WriteSchema)
///
and

\\\
ds.xmlread("filepath")
///

By disk IO, do I never think what is fast, most time is consumed by that
disk itself.

Just my thought,

Cor

Nov 12 '05 #9

P: n/a
Dragu,
| Should I use the IO.Stream? The XmlReader/XmlWriter?
I would recommend the one that is appropriate to what you are doing! If you
only have a path in a string, I would recommend ReadXmlSchema(String), if
you already has a Stream I would recommend ReadXmlSchema(Stream),

I would not be concerned about "which goes the fastest" until that routine
is proven to be a performance problem (via profiling with CLR profiler or
similar tool).

As I would expect the methods to be implemented in terms of each other,
specifically in terms of ReadXmlSchema(XmlReader) being the one that is
ultimately used.

In other words I would expect the implementation to be something like:

Sub ReadXmlSchema(ByVal fileName As String)
Dim reader As New XmlTextReader(fileName)
Try
ReadXmlSchema(reader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(ByVal stream As Stream)
Dim reader As New XmlTextReader(stream)
Try
ReadXmlSchema(reader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(ByVal reader As TextReader)
Dim xmlReader As New XmlTextReader(reader)
Try
ReadXmlSchema(reader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(ByVal reader As XmlReader)
' actually read the Xml Schema from...
End Sub
Of course there is also the 80/20 rule. That is 80% of the execution time of
your program is spent in 20% of your code. I will optimize (worry about
performance, memory consumption) the 20% once that 20% has been identified &
proven to be a performance problem via profiling (CLR Profiler is one
profiling tool).

For info on the 80/20 rule & optimizing only the 20% see Martin Fowler's
article "Yet Another Optimization Article" at
http://martinfowler.com/ieeeSoftware...timization.pdf

Further as Paul suggests, based on the options you use to create the
parameters (such as creating an XmlValidatingReader instead of a
XmlTextReader) your performance will vary. So as Stephany suggests you
really need to try them in the context of your program to see which is
faster!
Also rather then worry about which is faster per se I would consider where I
was writing to & reading from. For example can I afford to load the schema
once & keep it in a MemoryStream or a String & pass a MemoryStream to
ReadXmlSchema(Steam), or StringReader to ReadXmlSchema(TextReader) instead
of saving & reading from disk... Which now becomes a question of how the
data is "transmitted" between the applications. Disk, NetworkStream,
Clipboard, other...

Hope this helps
Jay


"DraguVaso" <pi**********@hotmail.com> wrote in message
news:42***********************@news.skynet.be...
| Hi,
|
| I should use XML to synchronize the data from different (VB.NET)
| applications, and I was just wondering which Overloads of these functions
| ( ReadXmlSchema, ReadXml and WriteXml) goes the fastest? I don't think the
| ReadXMLSchema would give a lot of difference, but maybe the overlaods of
| ReadXml and WriteXml will. Especially with larges files/datatables...
|
| Should I use the IO.Stream? The XmlReader/XmlWriter?
|
| Any help would be really appreciated!
|
| Thanks a lot in advance,
|
| Pieter
|
|
| The overloads:
|
| Reads the XML schema from the specified Stream into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(Stream)
| Reads the XML schema from the specified file into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(String)
| Reads the XML schema from the specified TextReader into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(TextReader)
| Reads the XML schema from the specified XmlReader into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(XmlReader)
|
<<snip>>
Nov 12 '05 #10

P: n/a
Thanks a lot for the nice explication and helpfull hints!

Pieter

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:Og**************@TK2MSFTNGP14.phx.gbl...
Dragu,
| Should I use the IO.Stream? The XmlReader/XmlWriter?
I would recommend the one that is appropriate to what you are doing! If you only have a path in a string, I would recommend ReadXmlSchema(String), if
you already has a Stream I would recommend ReadXmlSchema(Stream),

I would not be concerned about "which goes the fastest" until that routine
is proven to be a performance problem (via profiling with CLR profiler or
similar tool).

As I would expect the methods to be implemented in terms of each other,
specifically in terms of ReadXmlSchema(XmlReader) being the one that is
ultimately used.

In other words I would expect the implementation to be something like:

Sub ReadXmlSchema(ByVal fileName As String)
Dim reader As New XmlTextReader(fileName)
Try
ReadXmlSchema(reader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(ByVal stream As Stream)
Dim reader As New XmlTextReader(stream)
Try
ReadXmlSchema(reader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(ByVal reader As TextReader)
Dim xmlReader As New XmlTextReader(reader)
Try
ReadXmlSchema(reader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(ByVal reader As XmlReader)
' actually read the Xml Schema from...
End Sub
Of course there is also the 80/20 rule. That is 80% of the execution time of your program is spent in 20% of your code. I will optimize (worry about
performance, memory consumption) the 20% once that 20% has been identified & proven to be a performance problem via profiling (CLR Profiler is one
profiling tool).

For info on the 80/20 rule & optimizing only the 20% see Martin Fowler's
article "Yet Another Optimization Article" at
http://martinfowler.com/ieeeSoftware...timization.pdf

Further as Paul suggests, based on the options you use to create the
parameters (such as creating an XmlValidatingReader instead of a
XmlTextReader) your performance will vary. So as Stephany suggests you
really need to try them in the context of your program to see which is
faster!
Also rather then worry about which is faster per se I would consider where I was writing to & reading from. For example can I afford to load the schema
once & keep it in a MemoryStream or a String & pass a MemoryStream to
ReadXmlSchema(Steam), or StringReader to ReadXmlSchema(TextReader) instead
of saving & reading from disk... Which now becomes a question of how the
data is "transmitted" between the applications. Disk, NetworkStream,
Clipboard, other...

Hope this helps
Jay


"DraguVaso" <pi**********@hotmail.com> wrote in message
news:42***********************@news.skynet.be...
| Hi,
|
| I should use XML to synchronize the data from different (VB.NET)
| applications, and I was just wondering which Overloads of these functions | ( ReadXmlSchema, ReadXml and WriteXml) goes the fastest? I don't think the | ReadXMLSchema would give a lot of difference, but maybe the overlaods of
| ReadXml and WriteXml will. Especially with larges files/datatables...
|
| Should I use the IO.Stream? The XmlReader/XmlWriter?
|
| Any help would be really appreciated!
|
| Thanks a lot in advance,
|
| Pieter
|
|
| The overloads:
|
| Reads the XML schema from the specified Stream into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(Stream)
| Reads the XML schema from the specified file into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(String)
| Reads the XML schema from the specified TextReader into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(TextReader)
| Reads the XML schema from the specified XmlReader into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(XmlReader)
|
<<snip>>

Nov 12 '05 #11

P: n/a
christ man, one of the whole points of technical newsgroups is to save
time by learning from others' experiences. if someone knows the answer
and is willing to share, why not ask?

if you don't know, all you have to do is not reply.

Nov 12 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.