mirror of
https://github.com/stonega/tsacdop
synced 2025-02-10 08:30:45 +01:00
22 lines
338 B
Dart
22 lines
338 B
Dart
|
import 'package:xml/xml.dart';
|
||
|
|
||
|
class Title {
|
||
|
final String type;
|
||
|
final String value;
|
||
|
|
||
|
Title({
|
||
|
this.type,
|
||
|
this.value,
|
||
|
});
|
||
|
|
||
|
factory Title.parse(XmlElement element) {
|
||
|
if (element == null) {
|
||
|
return null;
|
||
|
}
|
||
|
return new Title(
|
||
|
type: element.getAttribute("type"),
|
||
|
value: element.text,
|
||
|
);
|
||
|
}
|
||
|
}
|