ValidateTemplateOutput.fromXml constructor

ValidateTemplateOutput.fromXml(
  1. XmlElement elem
)

Implementation

factory ValidateTemplateOutput.fromXml(_s.XmlElement elem) {
  return ValidateTemplateOutput(
    capabilities: _s.extractXmlChild(elem, 'Capabilities')?.let((elem) => _s
        .extractXmlStringListValues(elem, 'member')
        .map((s) => s.toCapability())
        .toList()),
    capabilitiesReason: _s.extractXmlStringValue(elem, 'CapabilitiesReason'),
    declaredTransforms: _s
        .extractXmlChild(elem, 'DeclaredTransforms')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    description: _s.extractXmlStringValue(elem, 'Description'),
    parameters: _s.extractXmlChild(elem, 'Parameters')?.let((elem) => elem
        .findElements('member')
        .map((c) => TemplateParameter.fromXml(c))
        .toList()),
  );
}