void GetCustomHtml(out string strLeftHtml, out string strRightHtml, out string strTopHtml, out string strBottomHtml) { strLeftHtml = ""; strRightHtml = ""; strTopHtml = ""; strBottomHtml = ""; // 获得配置参数 OpacApplication app = (OpacApplication)this.Page.Application["app"]; /* * * <footerBarControl> * <leftAnchor lang='zh'> * <a href="http://dp2003.com">图书馆主页</a> * </leftAnchor> * <leftAnchor lang='en'> * <a href="http://dp2003.com">Library Homepage</a> * </leftAnchor> ... */ // XmlNode nodeLeftAnchor = app.WebUiDom.DocumentElement.SelectSingleNode("titleBarControl/leftAnchor"); XmlNode parent = app.WebUiDom.DocumentElement.SelectSingleNode("footerBarControl"); if (parent != null) { // 从一个元素的下级的多个<strElementName>元素中, 提取语言符合的XmlNode // parameters: // bReturnFirstNode 如果找不到相关语言的,是否返回第一个<strElementName> XmlNode nodeLeftAnchor = DomUtil.GetLangedNode( this.Lang, parent, "leftHtml"); if (nodeLeftAnchor != null) { strLeftHtml = nodeLeftAnchor.InnerXml; } XmlNode nodeRightAnchor = DomUtil.GetLangedNode( this.Lang, parent, "rightHtml"); if (nodeRightAnchor != null) { strRightHtml = nodeRightAnchor.InnerXml; } XmlNode nodeTopAnchor = DomUtil.GetLangedNode( this.Lang, parent, "topHtml"); if (nodeTopAnchor != null) { strTopHtml = nodeTopAnchor.InnerXml; } XmlNode nodeBottomAnchor = DomUtil.GetLangedNode( this.Lang, parent, "bottomHtml"); if (nodeBottomAnchor != null) { strBottomHtml = nodeBottomAnchor.InnerXml; } } }