Example #1
0
        /// <summary>
        /// Format array into XML element
        /// </summary>
        /// <returns></returns>
        public override string toXmlString()
        {
            string s = "<" + Name;

            if (VarName != null && VarName.Length > 0)
            {
                s += " varName=\"" + VarName + "\"";
            }
            s += ">";
            if (sizeRef_ != null && isArrayVariable())
            {
                s += "<sizeRef>" + sizeRef_.toXmlString() + "</sizeRef>";
            }
            s += element_.toXmlString();
            s += dim_.toXmlString();
            s += "</" + Name + ">";
            return(s);
        }
Example #2
0
        /// <summary>
        /// Format a stack of dim elements in a hierarchy
        /// </summary>
        /// <returns></returns>
        public string toXmlString()
        {
            string s = "<dim";

            if (name_ != null && name_.Length > 0)
            {
                s += " name=\"" + name_ + "\"";
            }
            if (count_ > 0)
            {
                s += " indexTo=\"" + Convert.ToString(count_ - 1) + "\"";
            }
            s += ">";
            if (child_ != null)
            {
                s += child_.toXmlString();
            }
            s += "</dim>";
            return(s);
        }