
## __init__ {#}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class.



```python
def __init__(self):
    ...
```




## __init__ {#aspose.html.Configuration}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class.



```python
def __init__(self, configuration):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| configuration | [`Configuration`](/html/python-net/aspose.html/configuration) | The environment configuration. |


## __init__ {#aspose.html.Url}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, url):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| url | [`Url`](/html/python-net/aspose.html/url) | The document URL. |


## __init__ {#str}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, address):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| address | str | The document address. It will be combined with the current directory path to form an absolute URL. |


## __init__ {#aspose.html.net.RequestMessage}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, request):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| request | aspose.html.net.RequestMessage | The request message. |


## __init__ {#aspose.html.Url-aspose.html.Configuration}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, url, configuration):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| url | [`Url`](/html/python-net/aspose.html/url) | The document URL. |
| configuration | [`Configuration`](/html/python-net/aspose.html/configuration) | The environment configuration. |


## __init__ {#str-aspose.html.Configuration}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, address, configuration):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| address | str | The document address. It will be combined with the current directory path to form an absolute URL. |
| configuration | [`Configuration`](/html/python-net/aspose.html/configuration) | The environment configuration. |


## __init__ {#str-str}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, content, base_uri):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| content | str | The document content. |
| base_uri | str | The base URI of the document. It will be combined with the current directory path to form an absolute URL. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | `baseUri` is `null`. |




## __init__ {#str-aspose.html.Url}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, content, base_uri):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| content | str | The document content. |
| base_uri | [`Url`](/html/python-net/aspose.html/url) | The base URI of the document. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | `baseUri` is `null`. |




## __init__ {#io.RawIOBase-str}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).
Document loading starts from the current position in the stream.



```python
def __init__(self, content, base_uri):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| content | io.RawIOBase | The document content. |
| base_uri | str | The base URI of the document. It will be combined with the current directory path to form an absolute URL. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | `baseUri` is `null`. |




## __init__ {#io.RawIOBase-aspose.html.Url}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).
Document loading starts from the current position in the stream.



```python
def __init__(self, content, base_uri):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| content | io.RawIOBase | The document content. |
| base_uri | [`Url`](/html/python-net/aspose.html/url) | The base URI of the document. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | `baseUri` is `null`. |




## __init__ {#aspose.html.net.RequestMessage-aspose.html.Configuration}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, request, configuration):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| request | aspose.html.net.RequestMessage | The request message. |
| configuration | [`Configuration`](/html/python-net/aspose.html/configuration) | The environment configuration. |


## __init__ {#str-str-aspose.html.Configuration}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, content, base_uri, configuration):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| content | str | The document content. |
| base_uri | str | The base URI of the document. It will be combined with the current directory path to form an absolute URL. |
| configuration | [`Configuration`](/html/python-net/aspose.html/configuration) | The environment configuration. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | `baseUri` is `null`. |




## __init__ {#str-aspose.html.Url-aspose.html.Configuration}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).



```python
def __init__(self, content, base_uri, configuration):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| content | str | The document content. |
| base_uri | [`Url`](/html/python-net/aspose.html/url) | The base URI of the document. |
| configuration | [`Configuration`](/html/python-net/aspose.html/configuration) | The environment configuration. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | `baseUri` is `null`. |




## __init__ {#io.RawIOBase-str-aspose.html.Configuration}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).
Document loading starts from the current position in the stream.



```python
def __init__(self, content, base_uri, configuration):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| content | io.RawIOBase | The document content. |
| base_uri | str | The base URI of the document. It will be combined with the current directory path to form an absolute URL. |
| configuration | [`Configuration`](/html/python-net/aspose.html/configuration) | The environment configuration. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | `baseUri` is `null`. |




## __init__ {#io.RawIOBase-aspose.html.Url-aspose.html.Configuration}

Initializes a new instance of the [`HTMLDocument`](/html/python-net/aspose.html/htmldocument) class. Constructor works synchronously, it waits for loading of all the external resources (images, scripts, etc.).
To load document asynchronously use method [`Document.navigate`](/html/python-net/aspose.html.dom/document/navigate) or its overloads.
Or you can disable loading of some external resources by setting appropriate flags in [`IBrowsingContext.security`](/html/python-net/aspose.html.dom/ibrowsingcontext#security).
Document loading starts from the current position in the stream.



```python
def __init__(self, content, base_uri, configuration):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| content | io.RawIOBase | The document content. |
| base_uri | [`Url`](/html/python-net/aspose.html/url) | The base URI of the document. |
| configuration | [`Configuration`](/html/python-net/aspose.html/configuration) | The environment configuration. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | `baseUri` is `null`. |





### See Also
* module [`aspose.html`](../../)
* class [`HTMLDocument`](/html/python-net/aspose.html/htmldocument)
