Exemplo n.º 1
0
        public static void TestStudent()
        {
            string      xmlData = File.ReadAllText(@"c:\temp\student.xml");
            GWDataTable mytable = new GWDataTable("", "root", "Student");

            mytable.loadXml(xmlData);
            GWDataTable ret = mytable.find("[ Name _LIKE_ \"Mike Gold\" ]");

            Console.WriteLine("Len is " + ret.length());
            for (int i = 0; i < ret.length(); i++)
            {
                Student col = (Student)ret.GetRow(i);
                Console.WriteLine("Name is " + col.getName());
            }
        }
Exemplo n.º 2
0
        public static void TestData()
        {
            string      xmlData = File.ReadAllText(@"c:\temp\abc.xml");
            GWDataTable mytable = new GWDataTable();

            mytable.loadXml(xmlData);
            for (int i = 0; i < mytable.length(); i++)
            {
                GWRowInterface col = mytable.GetRow(i);
                foreach (KeyValuePair <string, string> entry in col.entrySet())
                {
                    Console.WriteLine(entry.Key + ":" + entry.Value);
                }
            }
        }