mirror of
https://github.com/stonega/tsacdop
synced 2025-02-09 16:18:48 +01:00
25 lines
440 B
Dart
25 lines
440 B
Dart
|
import 'package:xml/xml.dart';
|
||
|
|
||
|
class Category {
|
||
|
final String scheme;
|
||
|
final String label;
|
||
|
final String value;
|
||
|
|
||
|
Category({
|
||
|
this.scheme,
|
||
|
this.label,
|
||
|
this.value,
|
||
|
});
|
||
|
|
||
|
factory Category.parse(XmlElement element) {
|
||
|
if (element == null) {
|
||
|
return null;
|
||
|
}
|
||
|
return new Category(
|
||
|
scheme: element.getAttribute("scheme"),
|
||
|
label: element.getAttribute("label"),
|
||
|
value: element.text,
|
||
|
);
|
||
|
}
|
||
|
}
|