Beispiel #1
0
        public capex.text.XMLMaker start(string element, System.Collections.Generic.Dictionary <object, object> attrs, bool singleLine = false)
        {
            var v = new capex.text.XMLMaker.StartElement(element);

            v.setSingleLine(singleLine);
            if (attrs != null)
            {
                System.Collections.Generic.List <object> keys = cape.Map.getKeys(attrs);
                if (keys != null)
                {
                    var n = 0;
                    var m = keys.Count;
                    for (n = 0; n < m; n++)
                    {
                        var key = keys[n] as string;
                        if (key != null)
                        {
                            var val = attrs[key];
                            v.attribute(key, cape.String.asString(val));
                        }
                    }
                }
            }
            add((object)v);
            return(this);
        }
Beispiel #2
0
        public capex.text.XMLMaker textElement(string element, string text, System.Collections.Generic.Dictionary <object, object> attrs = null)
        {
            var se = new capex.text.XMLMaker.StartElement(element);

            se.setSingleLine(true);
            if (attrs != null)
            {
                System.Collections.Generic.List <object> keys = cape.Map.getKeys(attrs);
                if (keys != null)
                {
                    var n = 0;
                    var m = keys.Count;
                    for (n = 0; n < m; n++)
                    {
                        var key = keys[n] as string;
                        if (key != null)
                        {
                            var val = attrs[key];
                            se.attribute(key, cape.String.asString(val));
                        }
                    }
                }
            }
            add((object)se);
            add((object)text);
            add((object)new capex.text.XMLMaker.EndElement(element));
            return(this);
        }
Beispiel #3
0
        public capex.text.XMLMaker start(string element, string k1, string v1, bool singleLine = false)
        {
            var v = new capex.text.XMLMaker.StartElement(element);

            v.setSingleLine(singleLine);
            if (!(object.Equals(k1, null)))
            {
                v.attribute(k1, v1);
            }
            add((object)v);
            return(this);
        }