fromXmlString<T extends TagXml> static method

T? fromXmlString<T extends TagXml>(
  1. string xml,
  2. T constructor()
)

Create a instance of T from a XML string and using the provided constructor. The constructor is a function that creates a new instance of T and returns it.

Implementation

static T? fromXmlString<T extends TagXml>(string xml, T Function() constructor) => fromXmlStringList(xml, constructor).firstOrNull;