on_start_element Event

Fired when a begin-element tag is encountered in the document.

Syntax

class XMLStartElementEventParams(object):
  @property
  def namespace() -> str: ...
  @property
  def element() -> str: ...
  @property
  def q_name() -> str: ...
  @property
  def is_empty() -> bool: ...

# In class XML:
@property
def on_start_element() -> Callable[[XMLStartElementEventParams], None]: ...
@on_start_element.setter
def on_start_element(event_hook: Callable[[XMLStartElementEventParams], None]) -> None: ...

Remarks

The on_start_element event is fired when a begin-element tag is found in the document.

The element name is provided through the Element parameter. The attribute names and values (if any) are provided through the attr_name, attr_namespace, attr_prefix, and attr_value properties.

The IsEmpty parameter is true when the event corresponds with an empty element declaration.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Python Edition - Version 20.0 [Build 8307]