DBusIntrospectAnnotation.fromXml constructor

DBusIntrospectAnnotation.fromXml(
  1. XmlNode node
)

Implementation

factory DBusIntrospectAnnotation.fromXml(XmlNode node) {
  var name = node.getAttribute('name');
  if (name == null) {
    throw FormatException('D-Bus Introspection XML missing annotation name');
  }
  var value = node.getAttribute('value');
  if (value == null) {
    throw FormatException('D-Bus Introspection XML missing annotation value');
  }
  return DBusIntrospectAnnotation(name, value);
}