OcTrackData.fromXML constructor

OcTrackData.fromXML(
  1. String xmlSTR
)

Implementation

factory OcTrackData.fromXML(String xmlSTR) {
  final document = XmlDocument.parse(xmlSTR);
  String value = document.firstChild?.text ?? "";
  String trackID = document.firstChild!
      .attributes
      .firstWhere((element) => element.name.toString() == "trackID")
      .value;
  return OcTrackData(trackID: trackID, value: value.toString().getTrimmer);
}