StackOfOpenElements
StackOfOpenElements
Prezentare generală
StackOfOpenElements este o clasă în Aspose.Html FOSS pentru Python.
Stiva elementelor deschise, așa cum este definită în §13.2.4.2.
Această clasă oferă 12 metode pentru lucrul cu obiecte StackOfOpenElements în programe Python. Metodele disponibile includ: __init__, contains_node, has_in_button_scope, has_in_list_item_scope, has_in_scope, has_in_select_scope, has_in_table_scope, index_of, pop, pop_until, pop_until_node, push. Toți membrii publici sunt accesibili oricărei aplicații Python după instalarea pachetului Aspose.Html FOSS pentru Python. Proprietăți: bottom, current.
Proprietăți
| Nume | Tip | Acces | Descriere: |
|---|---|---|---|
current | `Element | None` | Citire |
bottom | `Element | None` | Citire |
Metode
| Semnătură | Descriere: |
|---|---|
__init__() | Calls init pe această instanță StackOfOpenElements. |
push(element: Element) | Împinge elementul în partea de sus a stivei. |
pop() → Element | Scoate și returnează elementul curent (de sus). |
pop_until() | Scoate elemente până când este scos un element cu una dintre tag_names. |
pop_until_node(node: Element) | Scoate elemente până când nodul este scos. |
contains_node(node: Element) → bool | Adevărat dacă obiectul nod exact se află pe stivă. |
has_in_scope(tag_name: str) → bool | §13.2.4.2 — are element în domeniu. |
has_in_button_scope(tag_name: str) → bool | §13.2.4.2 — are element în domeniul butonului. |
has_in_list_item_scope(tag_name: str) → bool | §13.2.4.2 — are element în domeniul elementului de listă. |
has_in_table_scope(tag_name: str) → bool | §13.2.4.2 — are element în domeniul tabelului. |
has_in_select_scope(tag_name: str) → bool | §13.2.4.2 — are element în domeniul selectului. |
index_of(element: Element) → int | Returnează indicele bazat pe zero de la fund, sau -1 dacă nu este găsit. |