示例#1
0
        //创建XML节点
        private string Preview_Create_XML_Node(EsbNodes inNodeType, string inNodeValue, int tabCount, bool isContain = false)
        {
            string oneTab = "   ";
            string _tab   = "";

            for (int i = 1; i <= tabCount; i++)
            {
                _tab += oneTab;
            }

            string _nodeType = inNodeType.ToString();

            string _ret = _tab + "<" + _nodeType + ">";

            if (isContain)
            {
                _ret += Environment.NewLine;
            }
            _ret += inNodeValue;
            if (isContain)
            {
                _ret += _tab;
            }
            _ret += "</" + _nodeType + ">" + Environment.NewLine;

            return(_ret);
        }
示例#2
0
        //创建XML节点
        private string Create_XML_Node(EsbNodes inNodeType, string inNodeValue)
        {
            string _nodeType = inNodeType.ToString();
            string _ret      = "<" + _nodeType + ">" + inNodeValue + "</" + _nodeType + ">";

            return(_ret);
        }