result.setServiceName(serviceNameInstance);
}
Element hostedServicePropertiesElement = XmlUtility.getElementByTagNameNS(hostedServiceElement, "http://schemas.microsoft.com/windowsazure", "HostedServiceProperties");
if (hostedServicePropertiesElement != null) {
HostedServiceProperties hostedServicePropertiesInstance = new HostedServiceProperties();
result.setProperties(hostedServicePropertiesInstance);
Element descriptionElement2 = XmlUtility.getElementByTagNameNS(hostedServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Description");
if (descriptionElement2 != null) {
String descriptionInstance2;
descriptionInstance2 = descriptionElement2.getTextContent();
hostedServicePropertiesInstance.setDescription(descriptionInstance2);
}
Element affinityGroupElement = XmlUtility.getElementByTagNameNS(hostedServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "AffinityGroup");
if (affinityGroupElement != null) {
String affinityGroupInstance;
affinityGroupInstance = affinityGroupElement.getTextContent();
hostedServicePropertiesInstance.setAffinityGroup(affinityGroupInstance);
}
Element locationElement = XmlUtility.getElementByTagNameNS(hostedServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Location");
if (locationElement != null) {
String locationInstance;
locationInstance = locationElement.getTextContent();
hostedServicePropertiesInstance.setLocation(locationInstance);
}
Element labelElement3 = XmlUtility.getElementByTagNameNS(hostedServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Label");
if (labelElement3 != null) {
String labelInstance3;
labelInstance3 = labelElement3.getTextContent() != null ? new String(Base64.decode(labelElement3.getTextContent())) : null;
hostedServicePropertiesInstance.setLabel(labelInstance3);
}
Element statusElement7 = XmlUtility.getElementByTagNameNS(hostedServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Status");
if (statusElement7 != null) {
HostedServiceStatus statusInstance7;
statusInstance7 = HostedServiceStatus.valueOf(statusElement7.getTextContent());
hostedServicePropertiesInstance.setStatus(statusInstance7);
}
Element dateCreatedElement = XmlUtility.getElementByTagNameNS(hostedServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "DateCreated");
if (dateCreatedElement != null) {
Calendar dateCreatedInstance;
dateCreatedInstance = DatatypeConverter.parseDateTime(dateCreatedElement.getTextContent());
hostedServicePropertiesInstance.setDateCreated(dateCreatedInstance);
}
Element dateLastModifiedElement = XmlUtility.getElementByTagNameNS(hostedServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "DateLastModified");
if (dateLastModifiedElement != null) {
Calendar dateLastModifiedInstance;
dateLastModifiedInstance = DatatypeConverter.parseDateTime(dateLastModifiedElement.getTextContent());
hostedServicePropertiesInstance.setDateLastModified(dateLastModifiedInstance);
}
Element extendedPropertiesSequenceElement2 = XmlUtility.getElementByTagNameNS(hostedServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "ExtendedProperties");
if (extendedPropertiesSequenceElement2 != null) {
for (int i27 = 0; i27 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(extendedPropertiesSequenceElement2, "http://schemas.microsoft.com/windowsazure", "ExtendedProperty").size(); i27 = i27 + 1) {
org.w3c.dom.Element extendedPropertiesElement2 = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(extendedPropertiesSequenceElement2, "http://schemas.microsoft.com/windowsazure", "ExtendedProperty").get(i27));
String extendedPropertiesKey2 = XmlUtility.getElementByTagNameNS(extendedPropertiesElement2, "http://schemas.microsoft.com/windowsazure", "Name").getTextContent();
String extendedPropertiesValue2 = XmlUtility.getElementByTagNameNS(extendedPropertiesElement2, "http://schemas.microsoft.com/windowsazure", "Value").getTextContent();
hostedServicePropertiesInstance.getExtendedProperties().put(extendedPropertiesKey2, extendedPropertiesValue2);
}
}
}
Element computeCapabilitiesElement = XmlUtility.getElementByTagNameNS(hostedServiceElement, "http://schemas.microsoft.com/windowsazure", "ComputeCapabilities");