UtilWebDownloadWebpageAsXml(String, WebProxy, String, Encoding) Method
Downloads the source-code of an Url that points to an Html document, then transforms it to Xml.
Namespace: DevCase.Core.Networking.CommonAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static XDocument DownloadWebpageAsXml(
string url,
WebProxy proxy,
string userAgent,
Encoding enc
)
Public Shared Function DownloadWebpageAsXml (
url As String,
proxy As WebProxy,
userAgent As String,
enc As Encoding
) As XDocument
Dim url As String
Dim proxy As WebProxy
Dim userAgent As String
Dim enc As Encoding
Dim returnValue As XDocument
returnValue = UtilWeb.DownloadWebpageAsXml(url,
proxy, userAgent, enc)
public:
static XDocument^ DownloadWebpageAsXml(
String^ url,
WebProxy^ proxy,
String^ userAgent,
Encoding^ enc
)
static member DownloadWebpageAsXml :
url : string *
proxy : WebProxy *
userAgent : string *
enc : Encoding -> XDocument
No code example is currently available or this language may not be supported.
- url String
-
The Url address.
- proxy WebProxy
-
The proxy to use.
- userAgent String
-
Specifies a custom user-agent to perform the web request.
- enc Encoding
-
The Encoding used to read the webpage.
XDocument
The resulting source-code.
This is a code example.
No code example is currently available or this language may not be supported.
Dim proxy As New WebProxy(Host:="myproxy address", Port:=800)
proxy.Credentials = New NetworkCredential("user", "pass")
Dim xml As XDocument = DownloadWebpageAsXml("http://www.elhacker.net/", proxy, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)", Encoding.UTF8)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.