DerivativeInfo.fromXmlElement constructor

DerivativeInfo.fromXmlElement(
  1. XmlElement data
)

Implementation

factory DerivativeInfo.fromXmlElement(XmlElement data) {
  final word = data.getElement(ApiXmlElement.word.name)!.innerText.trim();
  final linkType =
      data.getElement(ApiXmlElement.linkType.name)!.innerText.trim();
  final link = data.getElement(ApiXmlElement.link.name)?.innerText.trim();
  final linkTargetCode =
      data.getElement(ApiXmlElement.linkTargetCode.name)?.innerText.trim();
  return DerivativeInfo(
    word: word,
    linkType: linkType,
    link: link,
    linkTargetCode: linkTargetCode,
  );
}