mirror of
https://github.com/stonega/tsacdop
synced 2025-01-10 14:23:08 +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,
|
|
);
|
|
}
|
|
}
|