473,699 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fastest way to ReadXmlSchema, ReadXml and WriteXml

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(S tream)
Reads the XML schema from the specified file into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(S tring)
Reads the XML schema from the specified TextReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(T extReader)
Reads the XML schema from the specified XmlReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(X mlReader)

Reads XML schema and data into the DataSet using the specified
System.IO.Strea m.
[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.TextR eader.
[Visual Basic] Overloads Public Function ReadXml(TextRea der) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlR eader.
[Visual Basic] Overloads Public Function ReadXml(XmlRead er) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.Strea m 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.TextR eader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(TextRea der, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlR eader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(XmlRead er, XmlReadMode) As
XmlReadMode
Writes the current data for the DataSet using the specified
System.IO.Strea m.
[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(TextWr iter)
Writes the current data for the DataSet to the specified XmlWriter.
[Visual Basic] Overloads Public Sub WriteXml(XmlWri ter)
Writes the current data, and optionally the schema, for the DataSet using
the specified System.IO.Strea m 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(TextWr iter, 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(XmlWri ter, XmlWriteMode)

Nov 12 '05 #1
11 4858
The easiest way to find out is try them.
"DraguVaso" <pi**********@h otmail.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(S tream)
Reads the XML schema from the specified file into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(S tring)
Reads the XML schema from the specified TextReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(T extReader)
Reads the XML schema from the specified XmlReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(X mlReader)

Reads XML schema and data into the DataSet using the specified
System.IO.Strea m.
[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.TextR eader.
[Visual Basic] Overloads Public Function ReadXml(TextRea der) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlR eader.
[Visual Basic] Overloads Public Function ReadXml(XmlRead er) As XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.IO.Strea m 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.TextR eader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(TextRea der, XmlReadMode)
As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlR eader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(XmlRead er, XmlReadMode)
As
XmlReadMode
Writes the current data for the DataSet using the specified
System.IO.Strea m.
[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(TextWr iter)
Writes the current data for the DataSet to the specified XmlWriter.
[Visual Basic] Overloads Public Sub WriteXml(XmlWri ter)
Writes the current data, and optionally the schema, for the DataSet using
the specified System.IO.Strea m 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(TextWr iter, 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(XmlWri ter, XmlWriteMode)

Nov 12 '05 #2
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(XmlRead er, 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@localhos t> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
The easiest way to find out is try them.
"DraguVaso" <pi**********@h otmail.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(S tream)
Reads the XML schema from the specified file into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(S tring)
Reads the XML schema from the specified TextReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(T extReader)
Reads the XML schema from the specified XmlReader into the DataSet.
[Visual Basic] Overloads Public Sub ReadXmlSchema(X mlReader)

Reads XML schema and data into the DataSet using the specified
System.IO.Strea m.
[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.TextR eader.
[Visual Basic] Overloads Public Function ReadXml(TextRea der) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlR eader.
[Visual Basic] Overloads Public Function ReadXml(XmlRead er) As XmlReadMode Reads XML schema and data into the DataSet using the specified
System.IO.Strea m 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.TextR eader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(TextRea der, XmlReadMode) As
XmlReadMode
Reads XML schema and data into the DataSet using the specified
System.Xml.XmlR eader and XmlReadMode.
[Visual Basic] Overloads Public Function ReadXml(XmlRead er, XmlReadMode)
As
XmlReadMode
Writes the current data for the DataSet using the specified
System.IO.Strea m.
[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(TextWr iter)
Writes the current data for the DataSet to the specified XmlWriter.
[Visual Basic] Overloads Public Sub WriteXml(XmlWri ter)
Writes the current data, and optionally the schema, for the DataSet using the specified System.IO.Strea m 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(TextWr iter, 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(XmlWri ter, XmlWriteMode)


Nov 12 '05 #3
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**********@h otmail.com> wrote in message
news:42******** *************@n ews.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(XmlRead er, 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@localhos t> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
The easiest way to find out is try them.
"DraguVaso" <pi**********@h otmail.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(S tream)
> Reads the XML schema from the specified file into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(S tring)
> Reads the XML schema from the specified TextReader into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(T extReader)
> Reads the XML schema from the specified XmlReader into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(X mlReader)
>
> Reads XML schema and data into the DataSet using the specified
> System.IO.Strea m.
> [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.TextR eader.
> [Visual Basic] Overloads Public Function ReadXml(TextRea der) As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.Xml.XmlR eader.
> [Visual Basic] Overloads Public Function ReadXml(XmlRead er) As XmlReadMode > Reads XML schema and data into the DataSet using the specified
> System.IO.Strea m 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.TextR eader and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(TextRea der, XmlReadMode) > As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.Xml.XmlR eader and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(XmlRead er,
> XmlReadMode)
> As
> XmlReadMode
>
>
> Writes the current data for the DataSet using the specified
> System.IO.Strea m.
> [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(TextWr iter)
> Writes the current data for the DataSet to the specified XmlWriter.
> [Visual Basic] Overloads Public Sub WriteXml(XmlWri ter)
> Writes the current data, and optionally the schema, for the DataSet using > the specified System.IO.Strea m 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(TextWr iter, 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(XmlWri ter, XmlWriteMode)
>
>
>



Nov 12 '05 #4
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@localhos t> wrote in message
news:O9******** ******@TK2MSFTN GP09.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**********@h otmail.com> wrote in message
news:42******** *************@n ews.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(XmlRead er, 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@localhos t> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
The easiest way to find out is try them.
"DraguVaso" <pi**********@h otmail.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(S tream)
> Reads the XML schema from the specified file into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(S tring)
> Reads the XML schema from the specified TextReader into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(T extReader)
> Reads the XML schema from the specified XmlReader into the DataSet.
> [Visual Basic] Overloads Public Sub ReadXmlSchema(X mlReader)
>
> Reads XML schema and data into the DataSet using the specified
> System.IO.Strea m.
> [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.TextR eader.
> [Visual Basic] Overloads Public Function ReadXml(TextRea der) As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.Xml.XmlR eader.
> [Visual Basic] Overloads Public Function ReadXml(XmlRead er) As

XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.IO.Strea m 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.TextR eader and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(TextRea der,

XmlReadMode)
> As
> XmlReadMode
> Reads XML schema and data into the DataSet using the specified
> System.Xml.XmlR eader and XmlReadMode.
> [Visual Basic] Overloads Public Function ReadXml(XmlRead er,
> XmlReadMode)
> As
> XmlReadMode
>
>
> Writes the current data for the DataSet using the specified
> System.IO.Strea m.
> [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(TextWr iter)
> Writes the current data for the DataSet to the specified XmlWriter.
> [Visual Basic] Overloads Public Sub WriteXml(XmlWri ter)
> Writes the current data, and optionally the schema, for the DataSet

using
> the specified System.IO.Strea m 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(TextWr iter, 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(XmlWri ter, XmlWriteMode)
>
>
>



Nov 12 '05 #5
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
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******** ******@TK2MSFTN GP12.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
Pieter,

You understand it probably,

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

\\\
ds.xmlwrite("fi lepath", XmlWriteMode.Wr iteSchema)
///
and

\\\
ds.xmlread("fil epath")
///

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
One point I found out recently is that if you are using a
XmlValidatingRe ader and you are processing more than one file of the same
type, then it's definitely worthwhile building an XmlSchemaCollec tion 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******** *******@TK2MSFT NGP14.phx.gbl.. .
Pieter,

You understand it probably,

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

\\\
ds.xmlwrite("fi lepath", XmlWriteMode.Wr iteSchema)
///
and

\\\
ds.xmlread("fil epath")
///

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
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(S tring), if
you already has a Stream I would recommend ReadXmlSchema(S tream),

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(X mlReader) being the one that is
ultimately used.

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

Sub ReadXmlSchema(B yVal fileName As String)
Dim reader As New XmlTextReader(f ileName)
Try
ReadXmlSchema(r eader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(B yVal stream As Stream)
Dim reader As New XmlTextReader(s tream)
Try
ReadXmlSchema(r eader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(B yVal reader As TextReader)
Dim xmlReader As New XmlTextReader(r eader)
Try
ReadXmlSchema(r eader)
Finally
reader.Close()
End Try
End Sub

Sub ReadXmlSchema(B yVal 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 XmlValidatingRe ader 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(S team), or StringReader to ReadXmlSchema(T extReader) instead
of saving & reading from disk... Which now becomes a question of how the
data is "transmitte d" between the applications. Disk, NetworkStream,
Clipboard, other...

Hope this helps
Jay


"DraguVaso" <pi**********@h otmail.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(S tream)
| Reads the XML schema from the specified file into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(S tring)
| Reads the XML schema from the specified TextReader into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(T extReader)
| Reads the XML schema from the specified XmlReader into the DataSet.
| [Visual Basic] Overloads Public Sub ReadXmlSchema(X mlReader)
|
<<snip>>
Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
408
by: DraguVaso | last post by:
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?
0
1177
by: Tim Nelson | last post by:
I've got an XML document I am loading into a dataset using ..ReadXml/.ReadXmlSchema. The dataset looks perfect and I can bind it to a datagrid and elements appear as tables and attributes appear as columns. The only problem I have is InnerText values for example: <outer> <tag name="blah"> ... <function> some text here </function> <validate> some text here </validate>
0
264
by: John George | last post by:
I am writing the file correctly and it gives me the right xml file When I read it back, I am missing one element in the last row, it sets it to the initial value before I saved the origional file? Any ideas? Thanks, I am loading the xml file with this code; Dim myFileStream As New System.IO.FileStream _ (filename, System.IO.FileMode.Create) ' Create an XmlTextWriter with the fileStream. Dim myXmlWriter As New System.Xml.XmlTextWriter _
2
4817
by: C Glenn | last post by:
I'm attempting to use ReadXml. It's working in that I end up with some data in the DataSet. But I'm not able to deal with it effectively after that. The XML file is properly formatted in that it was created with WriteXML, so it contains the name of the table (I've inspected it to be sure). But after calling ReadXml the DataSet does not contain a table with the specified name. In fact, Tables does not contain a table corresponding to...
0
3277
by: =?Utf-8?B?bXJjc2hhcnBtYW4=?= | last post by:
Hello, There is a space(as a data) in one of the columns. And i save my DataTable as a xml file using DataSet. I used DataSet.WriteXml method to save as a xml file. Now if I read that .xml file using DataSet.ReadXml method,it removes space in that DataTable. Any idea...? This does not work in Visual Studio .NET 2003. If I execute this in VS .Net 2005, it works. I must make it work in VS 2003.
2
3328
by: joey.powell | last post by:
Hello guys, I have a pretty simple app that reads XML data (.ReadXML) into an in-memory dataset, runs some linq queries, mods the data, and then writes the XML (.WriteXML) back to disk. Everything works well until, occasionally, I get an OutOfMemoryException. So far this has only happened for a file that was about 50MB in size. All other, smaller files are working just fine. 50MB (+overhead of other objects etc...) certainly does not...
2
1672
by: Tony Johansson | last post by:
Hello! Assume the following : 1. I create a DataSet with some DataRelation. 2. I then use WriteXml to write the DataSet to an Xml document using DataRelation.Nested = True 3.I then read the Xml document using ReadXml to load and create a DataSet. Now to my question is this DataSet that was created from 3 the same DataSet with the same structure
0
8621
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9184
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8929
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8891
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7759
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5878
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2357
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.