Tekvel Magic
Loading...
Searching...
No Matches
scl Namespace Reference

Classes

class  ICD
 ICD file manipulation. More...
 
class  NSD
 Namespace definition processing. More...
 
class  RSD
 RSD file manipulation. More...
 
class  SCD
 SCD file manipulation. More...
 
class  SCL
 Common SCL-file manipulation class. More...
 
class  SclValidationResult
 SCL validation result. More...
 
class  SICS
 Class for SCL Implementation Conformance Statement (SICS). More...
 
class  SSD
 SSD file manipulation. More...
 

Functions

def xmlTreeMerge (a, b)
 Merge two XML trees. More...
 
def check_nsd_conditions (nsd_spec, scl_impl, **kwargs)
 Check NSD conditions for element specification. More...
 
def normalize_mac (mac_string)
 Normalize MAC address to SCL format. More...
 
def clone (element)
 Creates a full (deep) copy of an element. More...
 
def add_default_namespace_to_element (namespace_str, element_str)
 Adds namespace to an element. More...
 
def get_tag_without_namespace (element)
 Get element tag with no Namespace prefix. More...
 
def scl_element_from_string (scl_element_str, scl_namespace='http://www.iec.ch/61850/2003/SCL')
 Create SCL element from string. More...
 
def get_one_or_raise (element_list, element_identifier='Undefined')
 Get the first element from a list or raise an error if not exactly one element exists. More...
 
def get_element_by_attribute (dom, element_namespace, element_tag, attribute_value, attribute_name="name", strict=False)
 Get element by attribute. More...
 
def get_p_element_value (connected_ap, p_type)
 Get value of. More...
 
def get_p_element_list (connected_ap)
 Get list of. More...
 
def get_p_osi_element_list (connected_ap)
 Get list of. More...
 
def get_gse_maxtime (gse)
 Get MaxTime element for GSE. More...
 
def get_gse_mintime (gse)
 Get MinTime element for GSE. More...
 
def get_gse_maxtime_value (gse)
 Get MaxTime value for GSE. More...
 
def get_gse_mintime_value (gse)
 Get MinTime value for GSE. More...
 
def get_reference_for_element (element, ref_type=ReferenceType.ObjectReference)
 Get reference for element. More...
 
def get_dataset_fcda_list (et_dataset)
 Get FCDA list for DataSet. More...
 
def get_reference_for_fcda (et_fcda, ref_type=ReferenceType.ObjectReference)
 Form FCDA reference. More...
 
def get_LNodeType_element_by_id (dom, lnType)
 Get LNodeType element by ID. More...
 
def get_LN_element_by_name (dom, lnName)
 Get LN element by name. More...
 
def compare_ln_elements_by_path (ln1_name, ln2_name)
 Compare LN elements by path. More...
 
def get_DOI_element_by_name (et_LN, doi_name)
 Get DOI element by name. More...
 
def get_DOI_by_name (et_LN, doi_name)
 Get DOI element by name. More...
 
def get_SDI_element_by_seq_name (et_DOI, sdiSeq)
 Get SDI element by sequence name. More...
 
def get_DAI_element_by_name (et_DOI, dai_name)
 Get DAI element by name. More...
 
def get_sdo_type_recursive (et_root, et_element, sdo_seq_list)
 Get final element in DO/SDO/DA chain. More...
 
def get_regex_by_enumtype (enum_type)
 Get regex by EnumType. More...
 
def convert_mms_to_scl_ref (mms_ref)
 Converts MMSReference to ObjectReference. More...
 
def compare_data_models (model1, model2)
 
def compare_elements (domNode1, domNode2, queryElementSet1, queryElementSet2)
 
def remove_scl_element (element)
 Removes an SCL element. More...
 
def convertNodeToJSON (jsonNodeArray, sclNode)
 Converts an SCL node to JSON format. More...
 
def convertNodesToJSON (sclNodes)
 Converts list of XML nodes to JSON. More...
 
def get_name_for_ln (et_LN)
 Returns the full name for an LN / LN0 element. More...
 
def get_ancestors_tree_to_element (root, et_element, descendants)
 Get the tree of ancestors up to a specific element. More...
 
def equality_two_elements (element_1, element_2)
 Compare two XML elements. More...
 
def merge_two_axis (axis_1, axis_2, NSMAP)
 Merge two parent-child axis. More...
 
def check_string_template_conformance (string, template_string)
 Check if a string conforms to a given template. More...
 
def get_type_element (dom, xmlns, tag, type_id)
 Get type element from DOM by tag and ID. More...
 
def get_applicable_conditions ()
 FIXME: THIS IS A PLACEHOLDER FUNCTON, IT ALWAYS RETURNS ["M", "AtLeastOne"]. More...
 
def check_type_recursive (scl, nsd, element, nsd_element=None, **kwargs)
 Check element type recursive. More...
 
def compare_sections (model1, model2, section_name=None, exceptions=None)
 Compare sections between two models. More...
 

Variables

 NSD_7_4 = NSD(NSD_7_4_2007A2_PATH)
 
 NSD_7_4_2007A2 = NSD(NSD_7_4_2007A2_PATH)
 
 NSD_7_4_2007B = NSD(NSD_7_4_2007B_PATH)
 
 NSD_7_4_2007B3 = NSD(NSD_7_4_2007B3_PATH)
 
 NSD_7_4_FSK2020A = NSD(NSD_7_4_FSK2020A_PATH)
 
 SICS = SICS()
 

Function Documentation

◆ add_default_namespace_to_element()

def add_default_namespace_to_element (   namespace_str,
  element_str 
)

Adds namespace to an element.

Creates an XML element from string and adds namespace to it.

Parameters
namespace_strNamespace ID
element_strElement name
el1 = add_default_namespace_to_element("http://www.iec.ch/61850/2003/SCL", "IED")
# Creates et.Element el1, containing <IED> element in standard SCL namespace.
See also
scl_element_from_string

◆ check_nsd_conditions()

def check_nsd_conditions (   nsd_spec,
  scl_impl,
**  kwargs 
)

Check NSD conditions for element specification.

The function takes NSD specification and it's SCL implementation as paramters and compares the SCL implementation against NSD specification. The function is specifically designed for check_type_recursive() function, but, however, might be used separately if required.

Parameters
nsd_specNSD specification for the elment. Specification is presented as the list of child elements of the element. The example form is shown below:
[{'name': 'NamPlt', 'type': 'LPL', 'descID': 'IEC61850_7_4.LNGroupL::LLN0.NamPlt.desc',
'presCond': 'MOrootLD', 'dsPresCond': 'na', 'elementType': 'DataObject'},
{'name': 'Beh', 'type': 'ENS', 'underlyingType': 'BehaviourModeKind',
'descID': 'IEC61850_7_4.LNGroupL::LLN0.Beh.desc', 'presCond': 'M', 'dsPresCond': 'na',
'elementType': 'DataObject'}, ... ]
scl_implSCL implemenetation of the element in the form of dict object. Note that unlike the NSD specification, the SCL implementation is in the form of dict, not list. The keys are names of the elements. xmlElement attribute contains lxml.etree Element representation of specific element.
{'Mod': {'name': 'Mod', 'type': 'ENC_Mod_DOes', 'desc': 'Режим работы',
'xmlElement': <Element {http://www.iec.ch/61850/2003/SCL}DO at 0x7f9728088be0>,
'proprietary': False}, 'Beh': {'name': 'Beh', 'type': 'ENS_Beh', 'desc': 'Индикация поведения',
'xmlElement': <Element {http://www.iec.ch/61850/2003/SCL}DO at 0x7f9728088b90>,
'proprietary': False}, ... }
**kwargsAdditional keyword arguments specific for particular elements and conditions. Specifically the following presence conditions can be passed as kwargs:
  • MOnly = True/False, default=False. If True only mandatory elements (with presCond="M") will be checked.
  • MCondOnly = True/False, default=False. If True only conditional mandatory elements with conditionon fulfilled resulting in mandatory presence will be checked.
  • FCondOnly = True/False, default=False. If True only conditional forbidden elements with conditionon fulfilled resulting in forbidden presence will be checked.
  • MOdataNs = True/False
  • MOlnNs = True/False
  • MFln0 = True/False
  • MOln0 = True/False
  • MFsubst = True/False
  • MFscaledAV = True/False
  • MFscaledMagV = True/False
  • MFscaledAngV = True/False
  • CheckSCSM = True/False
Returns
Dict object of the following form: In case of full conformance with NSD
{"res": "Success", "messages": messages}
In case of non-conformance with NSD
{"res": "Fail", "errors": errors, "messages": messages}
It is highly recommended to show messages to the used even if result is Success as messages might contain some important information about skipped elements etc.
See also
check_type_recursive()

◆ check_string_template_conformance()

def check_string_template_conformance (   string,
  template_string 
)

Check if a string conforms to a given template.

Performs a check to see if the provided string matches the given template string.

Parameters
stringThe string to be checked.
template_stringThe regular expression template as a string.
Returns
bool: True if the string matches the template, False otherwise.
is_match = check_string_template_conformance("123-45-6789", r"\d{3}-\d{2}-\d{4}") # returns True

◆ check_type_recursive()

def check_type_recursive (   scl,
  nsd,
  element,
  nsd_element = None,
**  kwargs 
)

Check element type recursive.

Allows to check the element type recursively iterating child-elements and their templates

Parameters
sclthe SCL class instance object (e.g. ICD, SCD)
nsdNSD class instance object
elementet.Element-type element of the datamodel. Allowed elements are: LN0, LN, DO, SDO, DA, BDA
nsd_elementan NSD element to be used to check the element if context is required. The nsd_element parameter is mandatory if the DA/BDA is passed element parameter.
**kwargskeyword arguments object. The following keywords are accepted:
  • extended_cdc_forbidden = True/False, default =True. If True extended CDCs shall be considered as invalid (ed.2.0 and above) otherwise - not (ed.1.0)
  • extended_datype_forbidden = True/False, default =True. If True extended DATypes shall be considered as invalid (ed.2.0 and above) otherwise - not (ed.1.0)
  • MOnly = True/False, default =False. If set True only mandatory elements will be checked, no conditional presence will be verified.
  • MCondOnly = True/False, default =False. If True only conditional mandatory elements with conditions fulfilled resulting in mandatory presence will be checked.
  • FCondOnly = True/False, default =False. If True only conditional forbidden elements with conditions fulfilled resulting in forbidden presence will be checked.

◆ clone()

def clone (   element)

Creates a full (deep) copy of an element.

Wrapper around copy.deepcopy()

Parameters
elementThe XML element to be deeply copied.
Returns
A deep copy of the provided XML element.

◆ compare_data_models()

def compare_data_models (   model1,
  model2 
)

◆ compare_elements()

def compare_elements (   domNode1,
  domNode2,
  queryElementSet1,
  queryElementSet2 
)

◆ compare_ln_elements_by_path()

def compare_ln_elements_by_path (   ln1_name,
  ln2_name 
)

Compare LN elements by path.

Compares two logical node (LN) elements by their path and returns a list of differing attributes.

Parameters
ln1_nameName of the first logical node (LN) to be compared
ln2_nameName of the second logical node (LN) to be compared
Exceptions
Exceptionif the format of ln1_name or ln2_name is invalid
Returns
List of attribute names that differ between the two LNs

◆ compare_sections()

def compare_sections (   model1,
  model2,
  section_name = None,
  exceptions = None 
)

Compare sections between two models.

This function compares the SCL sections of two models, model1 and model2, based on a specified section name or by comparing all sections if no name is provided. The function identifies differences in attributes and elements between the two models. It supports the exclusion of certain elements and attributes and handles complex cases with optional exception handling for certain XML elements like FCDA and ExtRef. The result is returned as a dictionary of mismatched elements.

Parameters
model1The first model (SCL) for comparison.
model2The second model (SCL) for comparison.
section_name(optional) The section name to restrict the comparison to a specific SCL section. If not provided, all sections are compared.
exceptions(optional) A list of element names to exclude from the comparison.
Returns
A dictionary containing the differences between the two models, with mismatched elements as keys and the differences as values.
Exceptions
ExceptionRaised when an error occurs in parsing, or during element or attribute removal from the comparison lists.

◆ convert_mms_to_scl_ref()

def convert_mms_to_scl_ref (   mms_ref)

Converts MMSReference to ObjectReference.

The function converts MMSReference to ObjectReference (SCL-type) reference

Parameters
mms_refMMS-style reference to an element
Exceptions
ExceptionRaised if the reference does not match MMSReference format for any object type
Returns
ObjectReference (SCL-type) reference as a string
See also
ReferenceType

◆ convertNodesToJSON()

def convertNodesToJSON (   sclNodes)

Converts list of XML nodes to JSON.

Converts each node in the provided list of XML nodes to its JSON representation and returns a list of these JSON objects.

Parameters
sclNodesList of XML nodes to be converted.
Returns
List of JSON objects representing the provided XML nodes.
See also
convertNodeToJSON()

◆ convertNodeToJSON()

def convertNodeToJSON (   jsonNodeArray,
  sclNode 
)

Converts an SCL node to JSON format.

This function converts an SCL node and its children to a JSON format suitable for further processing.

Parameters
jsonNodeArrayArray to which the JSON representation of the node will be appended
sclNodeSCL node to be converted
jsonNodeArray = []
convertNodeToJSON(jsonNodeArray, sclNode)
See also
Dialog.show_single_tree_ok()

◆ equality_two_elements()

def equality_two_elements (   element_1,
  element_2 
)

Compare two XML elements.

Compares two XML elements to check if they are equal. Elements are considered equal if their tags, attributes, and text content are identical.

Parameters
element_1The first XML element to compare.
element_2The second XML element to compare.
Returns
True if both elements are equal, otherwise False.

◆ get_ancestors_tree_to_element()

def get_ancestors_tree_to_element (   root,
  et_element,
  descendants 
)

Get the tree of ancestors up to a specific element.

Constructs and returns an XML tree containing all ancestors from the root element to the specified element. The descendant elements are also included.

Parameters
rootThe root element from which to start the tree.
et_elementThe target element for which the ancestor tree is being built.
descendantsAn existing tree of descendant elements to be included in the ancestor tree.
Returns
The constructed XML tree including all ancestors and the specified element.
Exceptions
ExceptionTypeName of exception and exception conditions.

◆ get_applicable_conditions()

def get_applicable_conditions ( )

FIXME: THIS IS A PLACEHOLDER FUNCTON, IT ALWAYS RETURNS ["M", "AtLeastOne"].

◆ get_DAI_element_by_name()

def get_DAI_element_by_name (   et_DOI,
  dai_name 
)

Get DAI element by name.

Returns the DAI element within the context of a DOI/SDI element by its name attribute.

Parameters
et_DOIThe DOI or SDI element context
dai_nameThe name attribute of the DAI element
Returns
The DAI element with the specified name

◆ get_dataset_fcda_list()

def get_dataset_fcda_list (   et_dataset)

Get FCDA list for DataSet.

Returns a list of FCDA elements for the specified DataSet.

Parameters
et_datasetElement of type et._Element representing the DataSet
Returns
list of FCDA elements (et._Element)

◆ get_DOI_by_name()

def get_DOI_by_name (   et_LN,
  doi_name 
)

Get DOI element by name.

Returns the DOI element within the context of an LNode element by its name attribute.

Parameters
et_LNThe LNode element context
doi_nameThe name attribute of the DOI element to be returned
Returns
The DOI element with the specified name or None if not found

◆ get_DOI_element_by_name()

def get_DOI_element_by_name (   et_LN,
  doi_name 
)

Get DOI element by name.

Returns the DOI element within the context of an LNode element by its name attribute.

Parameters
et_LNThe LNode element context
doi_nameThe name attribute of the DOI element to be returned
Exceptions
Exceptionif the DOI element with the specified name is not found or if there are multiple elements with the same name
Returns
The DOI element with the specified name

◆ get_element_by_attribute()

def get_element_by_attribute (   dom,
  element_namespace,
  element_tag,
  attribute_value,
  attribute_name = "name",
  strict = False 
)

Get element by attribute.

Returns the first element by tag, name, and attribute value.

Parameters
domDOM object of the XML
element_namespaceNamespace of the element
element_tagTag of the element
attribute_valueValue of the attribute to search for
attribute_nameName of the attribute to search for (default: "name")
strictBoolean flag to specify if the search should be strict (default: False)
Returns
The first matching element as et.Element.
See also
get_one_or_raise

◆ get_gse_maxtime()

def get_gse_maxtime (   gse)

Get MaxTime element for GSE.

Returns the MaxTime element for a given GSE element.

Parameters
gseGSE element
Exceptions
ExceptionRaises an exception if the MaxTime element is not found.
Returns
et.Element representing the MaxTime element.

◆ get_gse_maxtime_value()

def get_gse_maxtime_value (   gse)

Get MaxTime value for GSE.

Returns the MaxTime value in milliseconds for a given GSE element.

Parameters
gseGSE element
Exceptions
ExceptionRaises an exception if the MaxTime element is not found.
Returns
str representing the MaxTime value in milliseconds.

◆ get_gse_mintime()

def get_gse_mintime (   gse)

Get MinTime element for GSE.

Returns the MinTime element for a given GSE element.

Parameters
gseGSE element
Exceptions
ExceptionRaises an exception if the MinTime element is not found.
Returns
et.Element representing the MinTime element.

◆ get_gse_mintime_value()

def get_gse_mintime_value (   gse)

Get MinTime value for GSE.

Returns the MinTime value in milliseconds for a given GSE element.

Parameters
gseGSE element
Exceptions
ExceptionRaises an exception if the MinTime element is not found.
Returns
str representing the MinTime value in milliseconds.

◆ get_LN_element_by_name()

def get_LN_element_by_name (   dom,
  lnName 
)

Get LN element by name.

Returns the LN or LN0 element with the specified lnName.

Parameters
domElement of type et._Element representing the DOM
lnNameName of the logical node (LN) to be retrieved
Exceptions
Exceptionif the lnName format is invalid or if the LN/LN0 element is not found
Returns
LN or LN0 element with the specified lnName

◆ get_LNodeType_element_by_id()

def get_LNodeType_element_by_id (   dom,
  lnType 
)

Get LNodeType element by ID.

Returns the LNodeType element with the specified ID.

Parameters
domElement of type et._Element representing the DOM
lnTypeID of the LNodeType to be retrieved
Exceptions
Exceptionif the LNodeType element is not found or if multiple elements are found
Returns
LNodeType element with the specified ID

◆ get_name_for_ln()

def get_name_for_ln (   et_LN)

Returns the full name for an LN / LN0 element.

Constructs and returns the full name of a Logical Node (LN) or Logical Node 0 (LN0) element based on its prefix, class, and instance attributes.

Parameters
et_LNThe LN or LN0 element of type et._Element.
Returns
The full name of the LN or LN0 element as a string.

◆ get_one_or_raise()

def get_one_or_raise (   element_list,
  element_identifier = 'Undefined' 
)

Get the first element from a list or raise an error if not exactly one element exists.

This function returns the first element of the list if the list contains exactly one element. If the list is empty, it raises an exception indicating that the element was not found. If the list contains more than one element, it raises an exception indicating that multiple elements were found.

Parameters
element_listThe list of elements.
element_identifierAn optional identifier for the element, used in error messages.
Exceptions
Exceptionif the element is not found or if multiple elements are found.
Returns
The first element of the list.

◆ get_p_element_list()

def get_p_element_list (   connected_ap)

Get list of.

elements

Returns all

elements of the ConnectedAP element.

Parameters
connected_apConnectedAP element
Returns
List of et.Element objects representing

elements.

See also
get_element_by_attribute

◆ get_p_element_value()

def get_p_element_value (   connected_ap,
  p_type 
)

Get value of.

element by type

Returns the value of the

element of a specified type.

Parameters
connected_apConnectedAP element
p_typeType of the

element to search for

Returns
The value of the

element as a string.

See also
get_element_by_attribute

◆ get_p_osi_element_list()

def get_p_osi_element_list (   connected_ap)

Get list of.

elements of type OSI-*

Returns all

elements with a type starting with OSI-.

Parameters
connected_apConnectedAP element
Returns
List of et.Element objects representing

elements of type OSI-*.

See also
get_element_by_attribute

◆ get_reference_for_element()

def get_reference_for_element (   element,
  ref_type = ReferenceType.ObjectReference 
)

Get reference for element.

Returns the path (ObjectReference, MMSReference) to the element.

Parameters
elementThe element for which to get the reference
ref_typeType of reference to return (ObjectReference or MMSReference)
Exceptions
ExceptionRaises an exception if the element type is unknown.
Returns
str representing the reference path to the element.
See also
ReferenceType

◆ get_reference_for_fcda()

def get_reference_for_fcda (   et_fcda,
  ref_type = ReferenceType.ObjectReference 
)

Form FCDA reference.

Forms an ObjectReference or MMSReference from the attributes of an FCDA element.

Parameters
et_fcdaElement of type et._Element representing the FCDA
ref_typeType of reference to be formed (ObjectReference or MMSReference)
Returns
Formed reference string
See also
ReferenceType

◆ get_regex_by_enumtype()

def get_regex_by_enumtype (   enum_type)

Get regex by EnumType.

Returns a regular expression based on the EnumType element.

Parameters
enum_typeThe EnumType element to generate the regex from
Returns
A regular expression string matching the enumeration values

◆ get_SDI_element_by_seq_name()

def get_SDI_element_by_seq_name (   et_DOI,
  sdiSeq 
)

Get SDI element by sequence name.

Returns the final SDI element by recursively traversing the sdiSeq chain.

Parameters
et_DOIThe DOI element context
sdiSeqThe sequence of SDI names separated by dots
Returns
The final SDI element in the sequence

◆ get_sdo_type_recursive()

def get_sdo_type_recursive (   et_root,
  et_element,
  sdo_seq_list 
)

Get final element in DO/SDO/DA chain.

Returns the final element in the DO/SDO/DA chain based on names from sdo_seq_list.

Parameters
et_rootThe root element for the search
et_elementThe current element in the chain
sdo_seq_listThe sequence list of SDO names
Returns
The final element in the DO/SDO/DA chain
Exceptions
ExceptionRaised if BDA type has nested elements

◆ get_tag_without_namespace()

def get_tag_without_namespace (   element)

Get element tag with no Namespace prefix.

Returns tag of an XML element without namespace ID in front (i.e. string only).

Parameters
elementElement of type et.Element
el1 = add_default_namespace_to_element("http://www.iec.ch/61850/2003/SCL", "IED")
el1_namespaced_tag = el1.tag # = "{http://www.iec.ch/61850/2003/SCL}IED"
el1_simple_tag = get_tag_without_namespace(el1) # = "IED"
See also
add_default_namespace_to_element

◆ get_type_element()

def get_type_element (   dom,
  xmlns,
  tag,
  type_id 
)

Get type element from DOM by tag and ID.

Retrieves a type element from the DOM using the specified tag and ID.

Parameters
domThe DOM object to search within.
xmlnsThe namespace to use for the search.
tagThe tag of the element to find.
type_idThe ID of the element to find.
Exceptions
ExceptionRaised if no element or more than one element is found.
Returns
The found element.
element_type = get_type_element(dom, "http://www.iec.ch/61850/2003/SCL", "LNodeType", "example_id")

◆ merge_two_axis()

def merge_two_axis (   axis_1,
  axis_2,
  NSMAP 
)

Merge two parent-child axis.

Merges two parent-child axis and returns a new tree. If no matches are found, returns an empty list.

Parameters
axis_1The first parent-child axis (et.Element).
axis_2The second parent-child axis (et.Element).
NSMAPThe namespace map used in the XML elements.
Returns
A new tree with merged elements, or an empty list if no matches are found.

◆ normalize_mac()

def normalize_mac (   mac_string)

Normalize MAC address to SCL format.

Converts a MAC address string to the standard SCL format. The function replaces colons with hyphens and converts all letters to uppercase.

Parameters
mac_stringMAC address as a string.
Returns
Normalized MAC address in SCL format as a string.

◆ remove_scl_element()

def remove_scl_element (   element)

Removes an SCL element.

This function removes an SCL element if it is of type et._Element

Parameters
elementThe SCL element to be removed
Exceptions
ExceptionRaised if the element is not of type et._Element
Returns
0 if the element is successfully removed

Удаляет SCL-элемент.

◆ scl_element_from_string()

def scl_element_from_string (   scl_element_str,
  scl_namespace = 'http://www.iec.ch/61850/2003/SCL' 
)

Create SCL element from string.

Creates an SCL element from pure string, parsing the string and adding required namespaces to element and attributes.

Parameters
scl_element_strSCL string with required element
scl_namespaceSCL NamespaceID (default: http://www.iec.ch/61850/2003/SCL)
Returns
et.Element containing element created from string with specified Namespace.
new_ied_string = "<IED name=\"NewIED\" desc=\"Some new IED\"/>"
new_ied_el = scl_element_from_string(new_ied_string)
See also
add_default_namespace_to_element get_tag_without_namespace

◆ xmlTreeMerge()

def xmlTreeMerge (   a,
  b 
)

Merge two XML trees.

Merge two XML trees A and B, so that each recursively found leaf element of B is added to A. If the element already exists in A, it is replaced with B's version. Tree structure is created in A as required to reflect the position of the leaf element in B. Given <top><first></first></top> and <top><first></first></top>, a merge results in <top><first></first></top> (order not guaranteed).

Parameters
aThe first XML tree (et.Element) to be merged.
bThe second XML tree (et.Element) to merge into the first.
Returns
The merged XML tree (et.Element).

Variable Documentation

◆ NSD_7_4

NSD_7_4 = NSD(NSD_7_4_2007A2_PATH)

◆ NSD_7_4_2007A2

NSD_7_4_2007A2 = NSD(NSD_7_4_2007A2_PATH)

◆ NSD_7_4_2007B

NSD_7_4_2007B = NSD(NSD_7_4_2007B_PATH)

◆ NSD_7_4_2007B3

NSD_7_4_2007B3 = NSD(NSD_7_4_2007B3_PATH)

◆ NSD_7_4_FSK2020A

NSD_7_4_FSK2020A = NSD(NSD_7_4_FSK2020A_PATH)

◆ SICS

SICS = SICS()