## HTMLDocument() {#constructor}

初始化一个新的实例[`HTMLDocument`](../)类.

```csharp
public HTMLDocument()
```

### 也可以看看

* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(Configuration) {#constructor_1}

初始化一个新的实例[`HTMLDocument`](../)类.

```csharp
public HTMLDocument(Configuration configuration)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| configuration | Configuration | 环境配置。 |

### 也可以看看

* class [Configuration](../../configuration/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(Url) {#constructor_4}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(Url url)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| url | Url | 文档网址。 |

### 也可以看看

* class [Url](../../url/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(Url, Configuration) {#constructor_5}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(Url url, Configuration configuration)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| url | Url | 文档网址。 |
| configuration | Configuration | 环境配置。 |

### 也可以看看

* class [Url](../../url/)
* class [Configuration](../../configuration/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(string) {#constructor_10}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(string address)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| address | String | 文档地址。它将与当前目录路径组合成一个绝对URL。 |

### 也可以看看

* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(string, Configuration) {#constructor_11}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(string address, Configuration configuration)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| address | String | 文档地址。它将与当前目录路径组合成一个绝对URL。 |
| configuration | Configuration | 环境配置。 |

### 也可以看看

* class [Configuration](../../configuration/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(string, string) {#constructor_14}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(string content, string baseUri)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| content | String | 文档内容。 |
| baseUri | String | 文档的基本 URI。它将与当前目录路径组合成一个绝对URL。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| ArgumentNullException | `基础Uri`是`无效的`. |

### 也可以看看

* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(string, string, Configuration) {#constructor_15}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(string content, string baseUri, Configuration configuration)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| content | String | 文档内容。 |
| baseUri | String | 文档的基本 URI。它将与当前目录路径组合成一个绝对URL。 |
| configuration | Configuration | 环境配置。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| ArgumentNullException | `基础Uri`是`无效的`. |

### 也可以看看

* class [Configuration](../../configuration/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(string, Url) {#constructor_12}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(string content, Url baseUri)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| content | String | 文档内容。 |
| baseUri | Url | 文档的基本 URI。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| ArgumentNullException | `基础Uri`是`无效的`. |

### 也可以看看

* class [Url](../../url/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(string, Url, Configuration) {#constructor_13}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(string content, Url baseUri, Configuration configuration)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| content | String | 文档内容。 |
| baseUri | Url | 文档的基本 URI。 |
| configuration | Configuration | 环境配置。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| ArgumentNullException | `基础Uri`是`无效的`. |

### 也可以看看

* class [Url](../../url/)
* class [Configuration](../../configuration/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(Stream, string) {#constructor_8}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/) . 文档加载从流中的当前位置开始。

```csharp
public HTMLDocument(Stream content, string baseUri)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| content | Stream | 文档内容。 |
| baseUri | String | 文档的基本 URI。它将与当前目录路径组合成一个绝对URL。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| ArgumentNullException | `基础Uri`是`无效的`. |

### 也可以看看

* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(Stream, string, Configuration) {#constructor_9}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/) . 文档加载从流中的当前位置开始。

```csharp
public HTMLDocument(Stream content, string baseUri, Configuration configuration)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| content | Stream | 文档内容。 |
| baseUri | String | 文档的基本 URI。它将与当前目录路径组合成一个绝对URL。 |
| configuration | Configuration | 环境配置。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| ArgumentNullException | `基础Uri`是`无效的`. |

### 也可以看看

* class [Configuration](../../configuration/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(Stream, Url) {#constructor_6}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/) . 文档加载从流中的当前位置开始。

```csharp
public HTMLDocument(Stream content, Url baseUri)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| content | Stream | 文档内容。 |
| baseUri | Url | 文档的基本 URI。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| ArgumentNullException | `基础Uri`是`无效的`. |

### 也可以看看

* class [Url](../../url/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(Stream, Url, Configuration) {#constructor_7}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/) . 文档加载从流中的当前位置开始。

```csharp
public HTMLDocument(Stream content, Url baseUri, Configuration configuration)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| content | Stream | 文档内容。 |
| baseUri | Url | 文档的基本 URI。 |
| configuration | Configuration | 环境配置。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| ArgumentNullException | `基础Uri`是`无效的`. |

### 也可以看看

* class [Url](../../url/)
* class [Configuration](../../configuration/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(RequestMessage) {#constructor_2}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(RequestMessage request)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| request | RequestMessage | 请求消息。 |

### 也可以看看

* class [RequestMessage](../../../aspose.html.net/requestmessage/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)

---

## HTMLDocument(RequestMessage, Configuration) {#constructor_3}

初始化一个新的实例[`HTMLDocument`](../)班级。构造函数同步工作，它等待加载所有外部资源（图像、脚本等）。 异步加载文档使用方法[`Navigate`](../../../aspose.html.dom/document/navigate/)或其重载。 或者您可以通过在中设置适当的标志来禁用某些外部资源的加载[`Security`](../../../aspose.html.dom/ibrowsingcontext/security/).

```csharp
public HTMLDocument(RequestMessage request, Configuration configuration)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| request | RequestMessage | 请求消息。 |
| configuration | Configuration | 环境配置。 |

### 也可以看看

* class [RequestMessage](../../../aspose.html.net/requestmessage/)
* class [Configuration](../../configuration/)
* class [HTMLDocument](../)
* 命名空间 [Aspose.Html](../../htmldocument/)
* 部件 [Aspose.HTML](../../../)


