惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

博客园 - 礼拜一

MAC实用技巧 。 工业设计的10个基本法则 Web可用性设计的247条指导方针 选中文本,变绿~ Examples of location paths using the unabbreviated syntax C# Console:利用mspaint打开图像并保存 。 15戒律 HttpWebRequest默认的只有2个并发连接限制!!!!! 在外企工作,一些英語用法潜规则 vs2008命令窗口使用 Visual Studio 2005 中的命令窗口 Error: No such interface supported 动态加载UserControl~ - 礼拜一 - 博客园 英语常用高频语句 jQuery的一些备忘 - 礼拜一 - 博客园 XSLT模式匹配的语法 XPath表达式(缩写和详写方式) 穷死了,看电子书吧~ C#里边的控件缩写大全(比较规范)
获取远程XML文档
礼拜一 · 2010-03-30 · via 博客园 - 礼拜一

Posted on 2010-03-30 16:51  礼拜一  阅读(583)  评论(0)    收藏  举报

        private XDocument GetXDocument(string url)
        {
            Uri uri 
= new Uri(url);
            System.Net.WebClient wb 
= new System.Net.WebClient();
            wb.Proxy.Credentials 
= System.Net.CredentialCache.DefaultCredentials;
            MemoryStream ms 
= new MemoryStream(wb.DownloadData(uri));
            System.Xml.XmlTextReader rdr 
= new System.Xml.XmlTextReader(ms);
            XDocument doc 
= XDocument.Load(rdr);
            
return doc;
        }