473,785 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1156
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.hasch anges. 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******** ******@TK2MSFTN GP14.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******** ******@TK2MSFTN GP11.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.hasch anges. 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******** ******@TK2MSFTN GP14.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******** ********@TK2MSF TNGP12.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******** ********@TK2MSF TNGP12.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
4136
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
1676
by: puzzlecracker | last post by:
I am using cpp by the way? Thanks
6
1552
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) = DLookup("ID", "tblmain", "Salary = " & varSomeValue) Then
0
1020
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
8961
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 to search any longer. Currently I am using this code. But I think it's too slow, because it runs through whole dimension. I know this is trivial question, but is there any way to stop this loop, or better way to search? I mean - FASTER?
2
1412
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 info> </stockitem> <stockitem>
4
3130
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 can speed up the processing substantially? as it currently takes about 10 minutes and thats just way too long because there is many of these imports that I need to do.... I currently insert each record one by one and I imagine thats where all the...
1
1620
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 continued writing (no need to close and open, so that it was very quick). How is it the best .net way to get this "file change" the quickest possible? Thanks! Ricardo Vázquez.
4
2974
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 find the best approach people on here have found to be the most efficient way to load the data within these boundaries. I don't want to load all of the CSV data but I do need to load about 70% of it; maybe a little more and the CSV file itself...
4
27212
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? do I have to loop through them? Example = I need the content for the Home Page, and I have the id=Home in the xml, how do I get the rest of the data to write out to the page in that node between <page id="Home"> and </page> <?xml version="1.0"...
0
9481
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
10341
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...
0
10155
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9954
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
8979
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
7502
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
6741
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();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2881
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.