473,395 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

quickest way to read xml from the web

Hi there,

My client would like to process an xml file. the structure of which is as
below.
<xml>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<xml>
Now, the latest stock item will always be on top, thus if today i've process
all of the above xml stockitems, then tomorrow, all i need
to do is to process the first couple of xml stockitem elements (tags) which
are greater than yesterdays <releaseddate>.
This xml file can and does grow pretty fast (couple of megs) and is cleaned
up by the vendor only every couple of months (if not weeks).
I need to process the xml file such that as soon as i find an xml stockitem
which has the releaseddate as something that i've processed, then to finish
processing the xml file.
Which means i do not want to download the entire xml file for processing,
rather bring down only chunks (bits) of the xml file and read it line by
line (or stockitem by stockitem).

Can this be done?

(Currently i load the entire xml into an xmldocument class and then process
it).
Dec 19 '05 #1
5 1134
Emmanuel,

Of course use a webservice.

This is what I call forever the nicest walkthrough on MSDN

http://msdn.microsoft.com/library/de...alkthrough.asp

If you see the new walkthrough for 2.0 know than that it contains the not
existing method datatable.haschanges. For that you have to put the datatable
first in a dataset. I thought that there was more not right in this sample,
however it has some renewing things.

http://msdn2.microsoft.com/en-us/library/1as0t7ff.aspx

I hope this helps,

Cor

"Emmanuel" <em@enforge.net.ij> schreef in bericht
news:uN**************@TK2MSFTNGP14.phx.gbl...
Hi there,

My client would like to process an xml file. the structure of which is as
below.
<xml>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<xml>
Now, the latest stock item will always be on top, thus if today i've
process all of the above xml stockitems, then tomorrow, all i need
to do is to process the first couple of xml stockitem elements (tags)
which are greater than yesterdays <releaseddate>.
This xml file can and does grow pretty fast (couple of megs) and is
cleaned up by the vendor only every couple of months (if not weeks).
I need to process the xml file such that as soon as i find an xml
stockitem which has the releaseddate as something that i've processed,
then to finish processing the xml file.
Which means i do not want to download the entire xml file for processing,
rather bring down only chunks (bits) of the xml file and read it line by
line (or stockitem by stockitem).

Can this be done?

(Currently i load the entire xml into an xmldocument class and then
process it).

Dec 19 '05 #2
You fail to understand the point.
I have no control over what the vendor exposes.
Asking the vendor to expose a webservice or the like is out of the question.

All i can do is retrieve the XML file and process it.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:er**************@TK2MSFTNGP11.phx.gbl...
Emmanuel,

Of course use a webservice.

This is what I call forever the nicest walkthrough on MSDN

http://msdn.microsoft.com/library/de...alkthrough.asp

If you see the new walkthrough for 2.0 know than that it contains the not
existing method datatable.haschanges. For that you have to put the
datatable first in a dataset. I thought that there was more not right in
this sample, however it has some renewing things.

http://msdn2.microsoft.com/en-us/library/1as0t7ff.aspx

I hope this helps,

Cor

"Emmanuel" <em@enforge.net.ij> schreef in bericht
news:uN**************@TK2MSFTNGP14.phx.gbl...
Hi there,

My client would like to process an xml file. the structure of which is as
below.
<xml>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional info>
</stockitem>
<xml>
Now, the latest stock item will always be on top, thus if today i've
process all of the above xml stockitems, then tomorrow, all i need
to do is to process the first couple of xml stockitem elements (tags)
which are greater than yesterdays <releaseddate>.
This xml file can and does grow pretty fast (couple of megs) and is
cleaned up by the vendor only every couple of months (if not weeks).
I need to process the xml file such that as soon as i find an xml
stockitem which has the releaseddate as something that i've processed,
then to finish processing the xml file.
Which means i do not want to download the entire xml file for processing,
rather bring down only chunks (bits) of the xml file and read it line by
line (or stockitem by stockitem).

Can this be done?

(Currently i load the entire xml into an xmldocument class and then
process it).


Dec 19 '05 #3
> You fail to understand the point.
I have no control over what the vendor exposes.
Asking the vendor to expose a webservice or the like is out of the
question.

All i can do is retrieve the XML file and process it.

Why do I fail to understand the point. Did you write that above already.

The other possibility did look for me to ridicules that it could be asked in
a high level program language newsgroup.

If you want to go into the OSI/ISO layers to shorten the time based on your
vendors file, than you can maybe hire somebody who will do that for you in
C++.

Why did you think webservices was created if there was for this such an easy
solution as you propose.

Just my thought,

Cor
Dec 19 '05 #4
If you have a closer look at what i've written you'd not have written what
you did.
This xml file can and does grow pretty fast (couple of megs) and is
cleaned up by the vendor only every couple of months (if not weeks).
And you have clearly understood that the vendor isn't me nor the client.
The client downloads the xml file exposed by the vendor (someone other than
me or the client).
Thus me asking the vendor to go ahead and develop a webservice just for me
to save time and use it would well.......no further comments on that.
Thats ridiculous!!!
Don't you agree???

Also, I clearly asked for a way to READ an XML file, not an elaborate
solution..
Just a simple way of reading of the xml file.

Next time i suggest you read the entire thread rather than picking up just
keywords in it so that you could provide instantaneous replies by providing
links which mean nothing, just for the sake of it.

And you being a .NET developer should be ashamed of what you said.
What on earth do you think classes such as XMLReader, XMLTextReader, reader
classes are for??!?!?!?

Fast, non cashed forward only reading of XML files.
What purpose do you think they serve?!?!?!?!

Just my thoughts
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... You fail to understand the point.
I have no control over what the vendor exposes.
Asking the vendor to expose a webservice or the like is out of the
question.

All i can do is retrieve the XML file and process it.

Why do I fail to understand the point. Did you write that above already.

The other possibility did look for me to ridicules that it could be asked
in a high level program language newsgroup.

If you want to go into the OSI/ISO layers to shorten the time based on
your vendors file, than you can maybe hire somebody who will do that for
you in C++.

Why did you think webservices was created if there was for this such an
easy solution as you propose.

Just my thought,

Cor

Dec 19 '05 #5
Also go ahead and check the reply i go on the ASP.NET newsgroup.
Now, don' you go around saying that i shouln't have posted this in here
Why?
- This is a VB.NET newsgroup
- VB.NET programmers do deal with XML
- I'm a (windows) VB.NET developer and not an ASP.NET one

The reason i posted it on ASP.NET is that ASP.NET developers too deal with
XML, and finally
they did'nt misinterpret my post as you have and hence tried to get back and
blame me for...

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
You fail to understand the point.
I have no control over what the vendor exposes.
Asking the vendor to expose a webservice or the like is out of the
question.

All i can do is retrieve the XML file and process it.

Why do I fail to understand the point. Did you write that above already.

The other possibility did look for me to ridicules that it could be asked
in a high level program language newsgroup.

If you want to go into the OSI/ISO layers to shorten the time based on
your vendors file, than you can maybe hire somebody who will do that for
you in C++.

Why did you think webservices was created if there was for this such an
easy solution as you propose.

Just my thought,

Cor

Dec 19 '05 #6

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

Similar topics

6
by: me | last post by:
Hi guys - the question is in the subject line. I thought of one quick way: std::ifstream input("myfile.dat") ; std::istreambuf_iterator beg(input), end ; std::vector DataFile(beg,end) ;
4
by: puzzlecracker | last post by:
I am using cpp by the way? Thanks
6
by: Deano | last post by:
I think my brain has short-circuited again :) Is this the quickest way to check for the existence of a given value in an array? e.g For i = 0 To rrst.RecordCount If myArray(i) =...
0
by: N k via DotNetMonster.com | last post by:
What is the quickest way to find the index of the first letter in a richTextBox? -- Message posted via http://www.dotnetmonster.com
6
by: Jozef Jarosciak | last post by:
Quickest way to find the string in 1 dimensional string array! I have a queue 1 dimensional array of strings called 'queue' and I need a fast way to search it. Once there is match, I don't need...
2
by: Emmanuel | last post by:
Hi there, My client would like to process an xml file. the structure of which is as below. <xml> <stockitem> <releaseddate>.....date value...</releaseddate> <...aditional tags for additional...
4
by: Bob | last post by:
Hi all, I'm trying to import data, modify the data then insert it into a new table. The code below works fine for it but it takes a really long time for 15,000 odd records. Is there a way I...
1
by: Ricardo Vazquez | last post by:
I'm writing log information into a file (via StreamWriter). When it reached a 4GB size, my MFC/C++ code copied that file to another name, truncated its length to 0 (CFile::SetLength(0)), and...
4
by: E11esar | last post by:
Hello there. I'm having several issues with regards to loading data into an Oracle database. I am developing in ASP.Net with C# and the source data is in a CSV file. What I am looking for is to...
4
by: rrayfield | last post by:
I have a XML file that contains content for an asp.net website. I need the quickest way to find the node and write the elements out to the page. Also how would I get the links section out of it? ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.