DocumentType

DocumentType

Genel Bakış

DocumentType, Python için Aspose.Html FOSS içinde bir sınıftır. Şu sınıftan türetilir: Node.

Bir belge türü bildirimi düğümü (<!DOCTYPE html>).

Bu sınıf, Python programlarında DocumentType nesneleriyle çalışmak için 23 yöntem sağlar. Kullanılabilir yöntemler şunlardır: __init__, add_event_listener, append_child, clone_node, compare_document_position, contains, dispatch_event, get_feature, get_root_node, get_user_data, has_child_nodes, insert_before ve 11 ek yöntem. Tüm genel üyeler, Aspose.Html FOSS for Python paketini kurduktan sonra herhangi bir Python uygulaması tarafından erişilebilir. Özellikler: child_nodes, first_child, is_connected, last_child, name, next_sibling ve 10 tane daha.

Özellikler

AdTürErişimAçıklama
node_namestrOkumaBelge tipi adı.
namestrOkumaBelge tipi adı (örn.
public_idstrOkumaPublic tanımlayıcı dizesi, veya ''.
system_idstrOkumaSistem tanımlayıcı dizesi, veya ''.
node_typeintOkumaInteger düğüm tipi sabiti NodeType kaynağından.
node_value`strNone`Okuma/Yazma
text_content`strNone`Okuma/Yazma
parent_node`NodeNone`Okuma
parent_element`ElementNone`Okuma
is_connectedboolOkumaBu düğümün bir belgenin düğüm ağacının parçası olup olmadığı (WHATWG DOM §4.4).
owner_document`DocumentNone`Okuma
child_nodesNodeListOkumaTüm alt düğümlerin canlı NodeList.
first_child`NodeNone`Okuma
last_child`NodeNone`Okuma
previous_sibling`NodeNone`Okuma
next_sibling`NodeNone`Okuma

Yöntemler

İmzaAçıklama
`init(name: str, public_id: str, system_id: str, owner_document: DocumentNone)`
get_root_node(composed: bool) → "Node"Düğümün ağacının kökünü döndür.
has_child_nodes() → boolBu düğümün en az bir doğrudan alt düğüme sahip olup olmadığını döndür.
`lookup_namespace_uri(prefix: strNone)→str
`lookup_prefix(namespace_uri: strNone)→str
`is_default_namespace(namespace_uri: strNone)→bool`
`is_supported(feature: str, version: strNone)→bool`
`get_feature(feature: str, version: strNone)→object
`set_user_data(key: str, data: objectNone, handler: object
get_user_data(key: str) → `objectNone`
append_child(node: Node) → NodeAppend node bu düğümün son çocuğu olarak.
`insert_before(node: Node, reference: NodeNone)→Node`
remove_child(node: Node) → NodeRemove node çocuk listesinden al ve döndür.
replace_child(new_child: Node, old_child: Node) → NodeReplace old_child with new_child.
clone_node(deep: bool) → NodeBu düğümün bir kopyasını döndür.
normalize()Bu düğümü ve tüm alt ağacını normalleştirilmiş forma getir.
`contains(other: NodeNone)→bool`
compare_document_position(other: "Node") → intPozisyonunu tanımlayan bir bitmask döndür. other bu düğüme göre.
`is_equal_node(other: NodeNone)→bool`
`is_same_node(other_node: NodeNone)→bool`
add_event_listener(type: str, listener: Callable, capture: bool, once: bool)Register listener olaylar için type.
remove_event_listener(type: str, listener: Callable, capture: bool)Daha önce kayıtlı bir dinleyiciyi kayıttan çıkar.
dispatch_event(event: "Event") → boolDispatch event atalar ağacı boyunca.

Ayrıca Bakınız

 Türkçe