MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / export_xml_by_ns

Method export_xml_by_ns

opcua/server/server.py:528–542  ·  view source on GitHub ↗

Export nodes of one or more namespaces to an XML file. Namespaces used by nodes are always exported for consistency. Args: server: opc ua server to use path: name of the xml file to write namespaces: list of string uris or int indexes of t

(self, path, namespaces=None)

Source from the content-addressed store, hash-verified

526 return exp.write_xml(path)
527
528 def export_xml_by_ns(self, path, namespaces=None):
529 """
530 Export nodes of one or more namespaces to an XML file.
531 Namespaces used by nodes are always exported for consistency.
532 Args:
533 server: opc ua server to use
534 path: name of the xml file to write
535 namespaces: list of string uris or int indexes of the namespace to export, if not provide all ns are used except 0
536
537 Returns:
538 """
539 if namespaces is None:
540 namespaces = []
541 nodes = get_nodes_of_namespace(self, namespaces)
542 self.export_xml(nodes, path)
543
544 def delete_nodes(self, nodes, recursive=False):
545 return delete_nodes(self.iserver.isession, nodes, recursive)

Callers

nothing calls this directly

Calls 2

export_xmlMethod · 0.95
get_nodes_of_namespaceFunction · 0.90

Tested by

no test coverage detected