public virtual void SetAlwaysReturnSelectionValues(bool val)
        {
            if (val == this.GetAlwaysReturnSelectionValues())
            {
                return;
            }
            ICsiXmlElement childByName1 = this.GetRootElement().FindChildByName("__session");

            if (childByName1 == null)
            {
                throw new CsiClientException(-1L, "会话不存在", this.GetType().FullName + ".setAlwaysReturnSelectionValues()");
            }
            ICsiXmlElement childByName2 = childByName1.FindChildByName("__connect");

            if (childByName2 == null)
            {
                throw new CsiClientException(-1L, "连接不存在", this.GetType().FullName + ".setAlwaysReturnSelectionValues()");
            }
            ICsiXmlElement parentElement = childByName2.FindChildByName("__processingDefaults") ?? (ICsiXmlElement) new CsiXmlElement((ICsiDocument)this, "__processingDefaults", childByName2);
            ICsiXmlElement childByName3  = parentElement.FindChildByName("__alwaysGetSelectionValues");

            if (childByName3 == null)
            {
                ICsiXmlElement csiXmlElement = (ICsiXmlElement) new CsiXmlElement((ICsiDocument)this, "__alwaysGetSelectionValues", parentElement);
            }
            else
            {
                parentElement.RemoveChild(childByName3);
            }
        }
        public static ICsiXmlElement FindCreateSetValue2(ICsiXmlElement sourceElement, string firstLevelTag, string secondLevelTag, string val, bool isCdata)
        {
            ICsiXmlElement element = sourceElement.FindChildByName(firstLevelTag);

            if (element == null)
            {
                element = new CsiXmlElement(sourceElement.GetOwnerDocument(), firstLevelTag, sourceElement);
            }
            return(FindCreateSetValue(element, secondLevelTag, val, isCdata));
        }
 protected virtual void removeChildByName(ICsiXmlElement element, string name)
 {
     if (StringUtil.IsEmptyString(name))
     {
         element.RemoveAllChildren();
     }
     else
     {
         ICsiXmlElement child = element.FindChildByName(name);
         if (child != null)
         {
             element.RemoveChild(child);
         }
     }
 }
        public static ICsiXmlElement FindCreateSetValue(ICsiXmlElement sourceElement, string tagName, string val, bool isCdata = false)
        {
            CsiXmlElement impl = (CsiXmlElement)sourceElement.FindChildByName(tagName);

            if (impl == null)
            {
                impl = new CsiXmlElement(sourceElement.GetOwnerDocument(), tagName, sourceElement);
            }
            if (!(!isCdata || StringUtil.IsEmptyString(val)))
            {
                SetCdataNode(impl.GetDomElement(), val);
                return(impl);
            }
            SetTextNode(impl.GetDomElement(), val);
            return(impl);
        }
        protected virtual ICsiXmlElement FindChildByName(string firstLevelChildTagName, string secondLevelChildTagName, string nameText)
        {
            IEnumerator enumerator = CsiXmlHelper.GetChildrenByName(this.GetOwnerDocument(), this.GetDomElement(), firstLevelChildTagName).GetEnumerator();

            while (enumerator.MoveNext())
            {
                ICsiXmlElement current = enumerator.Current as ICsiXmlElement;
                if (current.FindChildByName(secondLevelChildTagName) is CsiXmlElement impl)
                {
                    string str = impl.GetDomElement().Value;
                    if (str == null)
                    {
                        str = impl.GetElementValue();
                    }
                    if (nameText.Equals(str))
                    {
                        return(current);
                    }
                }
            }
            return(null);
        }