quickest way to read xml from the web

  • Thread starter Thread starter Emmanuel
  • Start date Start date
E

Emmanuel

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).
 
Emmanuel,

Of course use a webservice.

This is what I call forever the nicest walkthrough on MSDN

http://msdn.microsoft.com/library/d...atingDistributedWebApplicationWalkthrough.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
 
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.
 
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
 
If you have a closer look at what i've written you'd not have written what
you did.
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
 
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top