Discussion:
XML from the webserver
(too old to reply)
bar
2007-06-06 14:22:55 UTC
Permalink
Hello all
I read that TXMLDocument bundled with BCB 6.0 is for handling the xml files
from the local hard disk.
The code is working fine.

_di_IXMLDocument XMLConfig = LoadXMLDocument("C:\\config.xml");

Is there any way that i can get the interface of the xml document or read
the xml directly from the webserver without downloading the xml file itself.

What is the drawback if i use
_di_IXMLDocument XMLConfig =
LoadXMLDocument("http://www.jazirasoft.com/~webtest/tests/xml/config.xml");
I observed it is also working but when i changed the text in my xml file in
the webserver, the above code is not refreshing the xml text.

Thanks
SA
Remy Lebeau (TeamB)
2007-06-06 17:13:49 UTC
Permalink
Post by bar
I read that TXMLDocument bundled with BCB 6.0 is for
handling the xml files from the local hard disk.
It can also load XML from memory as well, such as via the
LoadXMLData() function, or the LoadFromStream() and LoadFromXML()
methods of the TXMLDocument class.
Post by bar
Is there any way that i can get the interface of the xml document
or read the xml directly from the webserver without downloading
the xml file itself.
No. You must download the file from the server before you can use it.
But there is no requirement saying that you have to save the XML to a
file on the hard drive.
Post by bar
What is the drawback if i use
_di_IXMLDocument XMLConfig =
LoadXMLDocument("http://www.jazirasoft.com/~webtest/tests/xml/config.x
ml");

That will only work if you are using MSXML as the underlying engine
for TXMLDocument's parsing. It just so happens that MSXML is the
default engine when running under Windows, but there are other engines
available.
Post by bar
I observed it is also working but when i changed the text in my
xml file in the webserver, the above code is not refreshing the xml
text.

Then the server is sending a cached copy of the file. That has
nothing to do with TXMLDocument.


Gambit
bar
2007-06-09 14:44:00 UTC
Permalink
Hello Remy thanks for reply.
Post by Remy Lebeau (TeamB)
No. You must download the file from the server before you can use it.
But there is no requirement saying that you have to save the XML to a
file on the hard drive.
How to access the xml file without saving to the hard drive.
Post by Remy Lebeau (TeamB)
Then the server is sending a cached copy of the file. That has
nothing to do with TXMLDocument.
can you pls give details to solve this issue. Even when i downloaded the
file it is not refreshing.

Thanks
SA
Remy Lebeau (TeamB)
2007-06-11 16:44:52 UTC
Permalink
Post by bar
can you pls give details to solve this issue. Even when i downloaded
the file it is not refreshing.
Then you need to talk to the website admin. This is a problem with
the web server itself.


Gambit
bar
2007-06-23 08:35:02 UTC
Permalink
Post by Remy Lebeau (TeamB)
Then you need to talk to the website admin. This is a problem with
the web server itself.
Hello Remy
i am confused that the same webserver with all the same preferences is
sending a updated file.

A application in VB 6.0 using InternetReadFile() function can able to
retreive the updated file.

Any alternative to the TldHTTP. In my program i am continuouly updating the
xml file in the webserver so i should avoid the Caching while downloading.

Best Regards
SA
Remy Lebeau (TeamB)
2007-06-24 19:25:10 UTC
Permalink
Post by bar
i am confused that the same webserver with all the same
preferences is sending a updated file.
A application in VB 6.0 using InternetReadFile() function can
able to retreive the updated file.
Then you need to use a packet sniffer, such as Ethereal/Wireshark, to
look at the raw HTTP traffic. MSXML is likely sending different
headers than whatever you use to download fresh files. A webserver,
or more likely an intermediate proxy, will send a cached file unless
otherwise explicitally asked not to by the client. Since you are
using LoadXMLDocument() with a URL, you have no control whatsoever
over the HTTP requests that are sent. You might want to consider
downloading the file yourself manually and then load it into
TXMLDocument separately afterwards.
Post by bar
Any alternative to the TldHTTP. In my program i am continuouly
updating the xml file in the webserver so i should avoid the
Caching while downloading.
Then you should be using TIdHTTP, or any other HTTP component/library
will do fine. Do not pass a URL to LoadXMLDocument() directly.


Gambit
bar
2007-06-26 15:30:35 UTC
Permalink
Post by Remy Lebeau (TeamB)
No. You must download the file from the server before you can use it.
But there is no requirement saying that you have to save the XML to a
file on the hard drive.

Hello Remy thanks for the reply.
Can you give details how to use the downloaded files without saving to disk.
I need to download xml, gif and jpeg will it work.
Thanks
SA
Remy Lebeau (TeamB)
2007-06-26 16:55:55 UTC
Permalink
Post by bar
Can you give details how to use the downloaded files without saving to disk.
I already told you in my original reply how load XML files from
memory.
Post by bar
I need to download xml, gif and jpeg will it work.
What do the images have to do with using XML? This discussion has
been about XML only. Images are a completely separate topic.


Gambit

Loading...