DomainJoinSettings domainJoinInstance = new DomainJoinSettings();
configurationSetInstance.setDomainJoin(domainJoinInstance);
Element credentialsElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Credentials");
if (credentialsElement != null) {
DomainJoinCredentials credentialsInstance = new DomainJoinCredentials();
domainJoinInstance.setCredentials(credentialsInstance);
Element domainElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Domain");
if (domainElement != null) {
String domainInstance;
domainInstance = domainElement.getTextContent();
credentialsInstance.setDomain(domainInstance);
}
Element usernameElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Username");
if (usernameElement != null) {
String usernameInstance;
usernameInstance = usernameElement.getTextContent();
credentialsInstance.setUserName(usernameInstance);
}
Element passwordElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Password");
if (passwordElement != null) {
String passwordInstance;
passwordInstance = passwordElement.getTextContent();
credentialsInstance.setPassword(passwordInstance);
}
}
Element joinDomainElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "JoinDomain");
if (joinDomainElement != null) {