ServiceDescription.fromXml constructor
ServiceDescription.fromXml(
- Uri uriBase,
- XmlElement service
Initializes this description from the provided xml element
Implementation
ServiceDescription.fromXml(Uri uriBase, XmlElement service) {
type = XmlUtils.getTextSafe(service, 'serviceType')!.trim();
id = XmlUtils.getTextSafe(service, 'serviceId')!.trim();
controlUrl =
patchUrl(uriBase, XmlUtils.getTextSafe(service, 'controlURL')!.trim())
.toString();
eventSubUrl =
patchUrl(uriBase, XmlUtils.getTextSafe(service, 'eventSubURL')!.trim())
.toString();
final m = XmlUtils.getTextSafe(service, 'SCPDURL');
if (m != null) {
scpdUrl = uriBase.resolve(m).toString();
}
}