HtmlTagBlock
Visão geral
HtmlTagBlock é uma classe em Aspose.Words FOSS para Python. Herda de: Block.
Uma tag HTML bruta, de nível de bloco ou inline (Markdig’s HtmlBlock /
``HtmlInline``, folded into one node here).Esta classe fornece 4 métodos para trabalhar com objetos HtmlTagBlock em programas Python. Os métodos disponíveis incluem: __init__, add_child, get_parent. Todos os membros públicos são acessíveis a qualquer aplicação Python após a instalação do pacote Aspose.Words FOSS para Python. Propriedades: block_level, children, heading_tag_level, is_cell, is_closing, is_first_child, e mais 12.
Propriedades
| Nome | Tipo | Acesso | Descrição |
|---|---|---|---|
is_known | bool | Leitura | Obtém o is known. |
is_para_or_heading | bool | Leitura | Obtém o is para ou heading. |
is_table | bool | Leitura | Obtém a tabela is. |
is_cell | bool | Leitura | Obtém o isCell. |
heading_tag_level | int | Leitura | Obtém o nível da tag de cabeçalho. |
tag_name | `` | Leitura | Obtém o nome da tag. |
raw_text | `` | Leitura | Obtém o texto bruto. |
is_self_closing | `` | Leitura | Obtém se é auto-fechamento. |
is_closing | `` | Leitura | Obtém o isClosing. |
is_self_contained | `` | Leitura | Obtém o is self contained. |
is_first_child | bool | Leitura | Obtém se é o primeiro filho. |
is_last_child | bool | Leitura | Obtém se é o último filho. |
next_sibling | Optional["Block"] | Leitura | Obtém o próximo irmão. |
previous_sibling | Optional["Block"] | Leitura | Obtém o irmão anterior. |
block_level | MarkdownBlockLevel | Leitura | Obtém o nível do bloco. |
type | `` | Leitura | Obtém o tipo. |
parent | Optional["Block"] | Leitura | Obtém o pai. |
children | list["Block"] | Leitura | Obtém os filhos. |
Métodos
| Assinatura | Descrição |
|---|---|
__init__(tag_name: str, raw_text: str, is_self_closing: bool, is_closing: bool, is_self_contained: bool) | Calls init(tag_name, raw_text, is_self_closing, is_closing, is_self_contained) nesta instância HtmlTagBlock. |
__init__(block_type: BlockType) | Calls init(block_type) nesta instância de HtmlTagBlock. |
add_child(child: "Block") → "Block" | Chama add_child(child) nesta instância de HtmlTagBlock. |
get_parent() → Optional["Block"] | Percorra a cadeia de ancestrais e retorne o primeiro bloco cujo |
``type`` is one of *types*, or ``None`` if none matches. |