/// <summary>
 /// This method Saves or Upadates the values into BatchImportXML
 /// </summary>
 private void SaveOrUpdateBatchImportXML()
 {
     objBatchImport = new Shell.SharePoint.DWB.Business.DataObjects.BatchImport();
     objBatchImport.BookID = strBookID;
     objBatchImport.DefaultSharedPath = strSharedAreaPath;
     objBatchImport.UserName = GetUserName();
     string strRowFilter;
     arlPageName = new ArrayList();
     foreach (GridViewRow gdvRow in grdBatchImportConfiguration.Rows)
     {
         objPageName = new PageName();
         objPageName.Name = HttpUtility.HtmlDecode(gdvRow.Cells[0].Text);
         DataTable dtResult = objWellBookBLL.GetTypeIIIPagesForBook(strParentSiteURL, strBookID, "No");
         DataView dvResultTable;
         dvResultTable = dtResult.DefaultView;
         strRowFilter = "Page_Name = '" + objPageName.Name + "'";
         dvResultTable.RowFilter = strRowFilter;
         dtResult = dvResultTable.ToTable();
         objPageName.PageCount = dtResult.Rows.Count.ToString();
         TextBox txtSharedAreaPath = (TextBox)gdvRow.FindControl("txtSharedAreaPath");
         objSharedPath = new SharedPath();
         objSharedPath.Path = txtSharedAreaPath.Text;
         objPageName.SharedPath = objSharedPath;
         DropDownList cboFileType = (DropDownList)gdvRow.FindControl("cboFileType");
         objFileType = new FileType();
         objFileType.Type = cboFileType.SelectedItem.Text;
         objPageName.FileType = objFileType;
         DropDownList cboNamingConvention = (DropDownList)gdvRow.FindControl("cboNamingConvention");
         objFileFormat = new FileFormat();
         objFileFormat.Format = cboNamingConvention.SelectedItem.Text;
         objFileFormat.ActualFormat = cboNamingConvention.SelectedItem.Value;
         objPageName.FileFormat = objFileFormat;
         arlPageName.Add(objPageName);
     }
     objBatchImport.PageName = arlPageName;
     objBatchImports = new BatchImports();
     arlBatchImport = new ArrayList();
     arlBatchImport.Add(objBatchImport);
     objBatchImports.BatchImport = arlBatchImport;
     BatchImportXmlGeneratotorBLL objBatchImportXmlGeneratotorBLL;
     objBatchImportXmlGeneratotorBLL = new BatchImportXmlGeneratotorBLL();
     XmlDocument xmlDoc = objBatchImportXmlGeneratotorBLL.CreateBatchImportXML(objBatchImports);
     //GetXMLFileData(xmlDoc, strBookID);
     BatchImportBLL objBatchImportBLL;
     objBatchImportBLL = new BatchImportBLL();
     objBatchImportBLL.UploadToDocumentLib(strBookID, xmlDoc);
 }
        /// <summary>
        /// Creates the shared path.
        /// </summary>
        /// <param name="sharedPath">The shared path.</param>
        /// <param name="PageNameElement">The page name element.</param>
        private void CreateSharedPath(SharedPath sharedPath, XmlElement PageNameElement)
        {
            XmlElement SharedPathElement = objXmlDocument.CreateElement(SHAREDPATH);
            PageNameElement.AppendChild(SharedPathElement);

            //Creating type attribute for filetype node.
            if (sharedPath.Path.ToString().Length > 0)
            {
                XmlAttribute Path = objXmlDocument.CreateAttribute(PATH);
                SharedPathElement.Attributes.Append(Path);
                Path.Value = sharedPath.Path;
            }
        }