This project is read-only.

Using CRecords class to work with MARCXML record collection.

            CRecords recCollection;
            CRecord myRec;
            CControlfield Cf;
            CDatafield Df;
            CSubfield Sf;
            //Working with MARCXML record collection.
            recCollection = new CRecords();
            //load data from xmlstring
            //load from file
            Console.WriteLine("Number of records in the collection is:" + recCollection.Count.ToString());
            //loop each record in the collection
            for (int i = 0; i < recCollection.Count; i++)
                myRec = recCollection.Record(i);
            //filter records to get list of matched
            recCollection.Filter("245", "Ray Charles", false);
            Console.WriteLine("Number of matched records:" + recCollection.Count.ToString());
            //un filter by refresh
            Console.WriteLine("Number of all records:" + recCollection.Count.ToString());

Last edited Oct 24, 2011 at 4:07 PM by mansofta, version 6


No comments yet.