/// <summary>
        /// Creates a new XML element with the given qualified name and sets the ProtectedStringType object as the value.
        /// </summary>
        /// <param name="name">The qualified name of element.</param>
        /// <param name="value">The ProtectedStringType object containing encrypted password and encryption method info.</param>
        /// <param name="doc">The XML document.</param>
        /// <returns>The XML element.</returns>
        private static XmlElement toPasswordElement(string name, MidpointModel3WebService.ProtectedStringType value, XmlDocument doc)
        {
            XmlElement element      = doc.CreateElement(COMMON_VALUE, name);
            XmlNode    innerElement = doc.CreateElement(CLEAR_VALUE, name);

            innerElement.InnerText = value.clearValue;
            element.AppendChild(innerElement);
            return(element);
        }
 /// <summary>
 /// Initialise a ProtectedStringType object with the given clear value.
 /// </summary>
 /// <param name="clearValue">The clear value to use.</param>
 /// <returns>The new ProtectedStringType object.</returns>
 private static MidpointModel3WebService.ProtectedStringType createProtectedString(string clearValue)
 {
     MidpointModel3WebService.ProtectedStringType protectedString = new MidpointModel3WebService.ProtectedStringType();
     protectedString.clearValue = clearValue;
     return(protectedString);
 }