Example #1
0
        internal XMLList Filter(string selector)
        {
            bool allFit = true;

            _tmpList.Clear();
            foreach (XML xml in _list)
            {
                if (xml.name != selector)
                {
                    allFit = false;
                }
                else
                {
                    _tmpList.Add(xml);
                }
            }

            if (allFit)
            {
                return(this);
            }
            else
            {
                XMLList ret = new XMLList(_tmpList);
                _tmpList = new List <XML>();
                return(ret);
            }
        }
Example #2
0
        public XMLList Filter(string selector)
        {
            bool allFit = true;

            _tmpList.Clear();
            int cnt = rawList.Count;

            for (int i = 0; i < cnt; i++)
            {
                XML xml = rawList[i];
                if (xml.name == selector)
                {
                    _tmpList.Add(xml);
                }
                else
                {
                    allFit = false;
                }
            }

            if (allFit)
            {
                return(this);
            }
            else
            {
                XMLList ret = new XMLList(_tmpList);
                _tmpList = new List <XML>();
                return(ret);
            }
        }
Example #3
0
 public XMLList Elements(string selector)
 {
     if (_children == null)
     {
         _children = new XMLList();
     }
     return(_children.Filter(selector));
 }
Example #4
0
 public XMLList Elements()
 {
     if (_children == null)
     {
         _children = new XMLList();
     }
     return(_children);
 }
Example #5
0
 static public int get_Count(IntPtr l)
 {
     try {
         FairyGUI.Utils.XMLList self = (FairyGUI.Utils.XMLList)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.Count);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #6
0
 static public int getItem(IntPtr l)
 {
     try {
         FairyGUI.Utils.XMLList self = (FairyGUI.Utils.XMLList)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         var ret = self[v];
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #7
0
        public XMLList Filter(string selector)
        {
            bool allFit = true;
            _tmpList.Clear();
            int cnt = rawList.Count;
            for (int i = 0; i < cnt; i++)
            {
                XML xml = rawList[i];
                if (xml.name == selector)
                    _tmpList.Add(xml);
                else
                    allFit = false;
            }

            if (allFit)
                return this;
            else
            {
                XMLList ret = new XMLList(_tmpList);
                _tmpList = new List<XML>();
                return ret;
            }
        }
Example #8
0
 public XMLList Elements(string selector)
 {
     if (_children == null)
         _children = new XMLList();
     return _children.Filter(selector);
 }
Example #9
0
 public XMLList Elements()
 {
     if (_children == null)
         _children = new XMLList();
     return _children;
 }