Skip to content

encodeXml

Canonical path: o6.encodeXml

encodeXml

encodeXml(obj)

Encode an OPC UA value with the XML encoding.

Parameters:

Name Type Description Default
obj Any

One scalar value of a registered OPC UA type.

required

Returns:

Type Description
bytes

The OPC UA XML representation of obj, as UTF-8 bytes.

Raises:

Type Description
TypeError

obj is not a scalar value of a registered OPC UA type.

StatusCodeError

open62541 rejected the value.