XDocument.Load问题 [英] problem with XDocument.Load

查看:72
本文介绍了XDocument.Load问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好
我在使用XDocument.Load
时遇到问题
我正在尝试开发控制台应用程序,以便从Internet加载xml数据并读取节点以了解要下载的文件

但是我们使用了该应用程序并在Internet中更新了xml,因此应用程序加载了旧版本并没有获得新的更新

我该怎么办以及如何解决此问题


这是代码

Hello
I have problem with XDocument.Load

im trying to develop console Application to load xml data form internet and read nodes to know which files to download it

but wehn i used the application and updated the xml in the internet the application load the old version didnt got the new updates

what i have to do and how i can fix this problem


this is the code

  class Program
    {
        static void Main(string[] args)
        {
                    
            try
            {
                XDocument doc = XDocument.Load("http://awalsolutions.net/MeduUpdates/Medulist.xml", LoadOptions.);
                CopyFiles(doc);
                
            }
            catch
            {
                Console.WriteLine("No Update Exists, Press any key to exit");
                Console.ReadLine();
            }

           
        }
   
   }
thanks

推荐答案

那么您的实际问题是什么?您的代码是否错误,或者服务器未使用文件的最新版本?还是两者都有?

删除浏览器中的缓存,然后重试.
So what''s your actual problem? Is your code wrong, or is the server not using the latest version of the file? Or both?

Delete your cache in the browser, and then try again.


HI,

您可以使用用户 HttpRequest [ ^ ]和


you can do this using little bit different way user HttpRequest[^] and Httpresponse[^]


这篇关于XDocument.Load问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆