// 读入<biblioDbGroup>相关配置 // return: // <biblioDbGroup>元素下<database>元素的个数。如果==0,表示配置不正常 public int LoadBiblioDbGroupParam( out string strError) { strError = ""; this.m_lock.AcquireWriterLock(m_nLockTimeout); try { XmlDocument dom = this.OpacCfgDom; this.ItemDbs = new List<ItemDbCfg>(); XmlNodeList nodes = dom.DocumentElement.SelectNodes("//biblioDbGroup/database"); if (nodes.Count == 0) return 0; for (int i = 0; i < nodes.Count; i++) { XmlNode node = nodes[i]; ItemDbCfg item = new ItemDbCfg(); item.DbName = DomUtil.GetAttr(node, "itemDbName"); item.BiblioDbName = DomUtil.GetAttr(node, "biblioDbName"); item.BiblioDbSyntax = DomUtil.GetAttr(node, "syntax"); item.IssueDbName = DomUtil.GetAttr(node, "issueDbName"); item.OrderDbName = DomUtil.GetAttr(node, "orderDbName"); item.CommentDbName = DomUtil.GetAttr(node, "commentDbName"); item.UnionCatalogStyle = DomUtil.GetAttr(node, "unionCatalogStyle"); // 2008/6/4 bool bValue = true; int nRet = DomUtil.GetBooleanParam(node, "inCirculation", true, out bValue, out strError); if (nRet == -1) { strError = "元素<//biblioDbGroup/database>属性inCirculation读入时发生错误: " + strError; return -1; } item.InCirculation = bValue; item.Role = DomUtil.GetAttr(node, "role"); this.ItemDbs.Add(item); } return nodes.Count; } finally { this.m_lock.ReleaseWriterLock(); } }