-
Hey guys, I create a server like the following:
After creation I export it via Problem: The xml file does not contain the (currently) empty namespace "mynamespace1". When I import the xml via Is there any way to export empty namespaces? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
-
yes yo need to change export code. But does it really make sense to export namespaces without nodes? |
Beta Was this translation helpful? Give feedback.
-
Now I also ran into this problem. It looks like we need to slightly change the method for adding namespase, since if you make a mirror from servers, then the parsers change the identifiers in the nodes :( |
Beta Was this translation helpful? Give feedback.
-
Alternatively, you can override the _add_namespaces method, remove the filter checking for nodes from it. async def _add_namespaces(self, nodes):
ns_to_export: list = (await self.server.get_namespace_array())[1:] # ignore OPC Foundation namespace
# write namespaces to xml
self._add_namespace_uri_els(ns_to_export) |
Beta Was this translation helpful? Give feedback.
Alternatively, you can override the _add_namespaces method, remove the filter checking for nodes from it.