PositionParser constructor
PositionParser(
- String text
Implementation
PositionParser(String text) {
if (text.isEmpty) {
return;
}
final doc = XmlDocument.parse(text);
final duration = doc.findAllElements('TrackDuration').first.text;
final rel = doc.findAllElements('RelTime').first.text;
final abs = doc.findAllElements('AbsTime').first.text;
if (duration.isNotEmpty) {
TrackDuration = duration;
}
if (rel.isNotEmpty) {
RelTime = rel;
}
if (abs.isNotEmpty) {
AbsTime = abs;
}
TrackURI = doc.findAllElements('TrackURI').first.text;
}