Element resourceExtensionReferencesSequenceElement = XmlUtility.getElementByTagNameNS(roleListElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionReferences");
if (resourceExtensionReferencesSequenceElement != null) {
for (int i20 = 0; i20 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(resourceExtensionReferencesSequenceElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionReference").size(); i20 = i20 + 1) {
org.w3c.dom.Element resourceExtensionReferencesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(resourceExtensionReferencesSequenceElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionReference").get(i20));
ResourceExtensionReference resourceExtensionReferenceInstance = new ResourceExtensionReference();
roleInstance.getResourceExtensionReferences().add(resourceExtensionReferenceInstance);
Element referenceNameElement = XmlUtility.getElementByTagNameNS(resourceExtensionReferencesElement, "http://schemas.microsoft.com/windowsazure", "ReferenceName");
if (referenceNameElement != null) {
String referenceNameInstance;
referenceNameInstance = referenceNameElement.getTextContent();
resourceExtensionReferenceInstance.setReferenceName(referenceNameInstance);
}
Element publisherElement = XmlUtility.getElementByTagNameNS(resourceExtensionReferencesElement, "http://schemas.microsoft.com/windowsazure", "Publisher");
if (publisherElement != null) {
String publisherInstance;
publisherInstance = publisherElement.getTextContent();
resourceExtensionReferenceInstance.setPublisher(publisherInstance);
}
Element nameElement8 = XmlUtility.getElementByTagNameNS(resourceExtensionReferencesElement, "http://schemas.microsoft.com/windowsazure", "Name");
if (nameElement8 != null) {
String nameInstance8;
nameInstance8 = nameElement8.getTextContent();
resourceExtensionReferenceInstance.setName(nameInstance8);
}
Element versionElement2 = XmlUtility.getElementByTagNameNS(resourceExtensionReferencesElement, "http://schemas.microsoft.com/windowsazure", "Version");
if (versionElement2 != null) {
String versionInstance2;
versionInstance2 = versionElement2.getTextContent();
resourceExtensionReferenceInstance.setVersion(versionInstance2);
}
Element resourceExtensionParameterValuesSequenceElement = XmlUtility.getElementByTagNameNS(resourceExtensionReferencesElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionParameterValues");
if (resourceExtensionParameterValuesSequenceElement != null) {
for (int i21 = 0; i21 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(resourceExtensionParameterValuesSequenceElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionParameterValue").size(); i21 = i21 + 1) {
org.w3c.dom.Element resourceExtensionParameterValuesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(resourceExtensionParameterValuesSequenceElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionParameterValue").get(i21));
ResourceExtensionParameterValue resourceExtensionParameterValueInstance = new ResourceExtensionParameterValue();
resourceExtensionReferenceInstance.getResourceExtensionParameterValues().add(resourceExtensionParameterValueInstance);
Element keyElement = XmlUtility.getElementByTagNameNS(resourceExtensionParameterValuesElement, "http://schemas.microsoft.com/windowsazure", "Key");
if (keyElement != null) {
String keyInstance;
keyInstance = keyElement.getTextContent();
resourceExtensionParameterValueInstance.setKey(keyInstance);
}
Element valueElement = XmlUtility.getElementByTagNameNS(resourceExtensionParameterValuesElement, "http://schemas.microsoft.com/windowsazure", "Value");
if (valueElement != null) {
String valueInstance;
valueInstance = valueElement.getTextContent() != null ? new String(Base64.decode(valueElement.getTextContent())) : null;
resourceExtensionParameterValueInstance.setValue(valueInstance);
}
Element typeElement = XmlUtility.getElementByTagNameNS(resourceExtensionParameterValuesElement, "http://schemas.microsoft.com/windowsazure", "Type");
if (typeElement != null) {
String typeInstance;
typeInstance = typeElement.getTextContent();
resourceExtensionParameterValueInstance.setType(typeInstance);
}
}
}
Element stateElement = XmlUtility.getElementByTagNameNS(resourceExtensionReferencesElement, "http://schemas.microsoft.com/windowsazure", "State");
if (stateElement != null) {
String stateInstance;
stateInstance = stateElement.getTextContent();
resourceExtensionReferenceInstance.setState(stateInstance);
}
}
}
Element vMImageNameElement = XmlUtility.getElementByTagNameNS(roleListElement, "http://schemas.microsoft.com/windowsazure", "VMImageName");