Element feedElement = XmlUtility.getElementByTagNameNS(responseDoc, "http://www.w3.org/2005/Atom", "feed");
if (feedElement != null) {
if (feedElement != null) {
for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(feedElement, "http://www.w3.org/2005/Atom", "entry").size(); i1 = i1 + 1) {
org.w3c.dom.Element entriesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(feedElement, "http://www.w3.org/2005/Atom", "entry").get(i1));
ServiceBusSharedAccessAuthorizationRule entryInstance = new ServiceBusSharedAccessAuthorizationRule();
result.getAuthorizationRules().add(entryInstance);
Element contentElement = XmlUtility.getElementByTagNameNS(entriesElement, "http://www.w3.org/2005/Atom", "content");
if (contentElement != null) {
Element sharedAccessAuthorizationRuleElement = XmlUtility.getElementByTagNameNS(contentElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SharedAccessAuthorizationRule");
if (sharedAccessAuthorizationRuleElement != null) {
Element claimTypeElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimType");
if (claimTypeElement != null) {
String claimTypeInstance;
claimTypeInstance = claimTypeElement.getTextContent();
entryInstance.setClaimType(claimTypeInstance);
}
Element claimValueElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimValue");
if (claimValueElement != null) {
String claimValueInstance;
claimValueInstance = claimValueElement.getTextContent();
entryInstance.setClaimValue(claimValueInstance);
}
Element rightsSequenceElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Rights");
if (rightsSequenceElement != null) {
for (int i2 = 0; i2 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rightsSequenceElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessRights").size(); i2 = i2 + 1) {
org.w3c.dom.Element rightsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rightsSequenceElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessRights").get(i2));
entryInstance.getRights().add(AccessRight.valueOf(rightsElement.getTextContent()));
}
}
Element createdTimeElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "CreatedTime");
if (createdTimeElement != null) {
Calendar createdTimeInstance;
createdTimeInstance = DatatypeConverter.parseDateTime(createdTimeElement.getTextContent());
entryInstance.setCreatedTime(createdTimeInstance);
}
Element modifiedTimeElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ModifiedTime");
if (modifiedTimeElement != null) {
Calendar modifiedTimeInstance;
modifiedTimeInstance = DatatypeConverter.parseDateTime(modifiedTimeElement.getTextContent());
entryInstance.setModifiedTime(modifiedTimeInstance);
}
Element keyNameElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "KeyName");
if (keyNameElement != null) {
String keyNameInstance;
keyNameInstance = keyNameElement.getTextContent();
entryInstance.setKeyName(keyNameInstance);
}
Element primaryKeyElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "PrimaryKey");
if (primaryKeyElement != null) {
String primaryKeyInstance;
primaryKeyInstance = primaryKeyElement.getTextContent();
entryInstance.setPrimaryKey(primaryKeyInstance);
}
Element secondaryKeyElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SecondaryKey");
if (secondaryKeyElement != null) {
String secondaryKeyInstance;
secondaryKeyInstance = secondaryKeyElement.getTextContent();
entryInstance.setSecondaryKey(secondaryKeyInstance);
}
Element revisionElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Revision");
if (revisionElement != null) {
int revisionInstance;
revisionInstance = DatatypeConverter.parseInt(revisionElement.getTextContent());
entryInstance.setRevision(revisionInstance);
}
}
}
}
}