Click here to Skip to main content
15,861,125 members
Articles / Mobile Apps / Windows Mobile

Index XML Documents with VTD+XML

Rate me:
Please Sign up or sign in to vote.
4.68/5 (13 votes)
11 Jun 2008CPOL12 min read 79.2K   458   38  
Introduces a simple, efficient, human-readable XML index called VTD+XML.
using System;
using com.ximpleware;

namespace accessIndex
{
    class accessIndex
    {
        static void Main(string[] args)
        {
            VTDGen vg = new VTDGen();
            try
            {
                VTDNav vn = vg.loadIndex("d:/codeProject/app3/po.vxl");
                AutoPilot ap = new AutoPilot(vn);
                ap.selectXPath("/purchaseOrder/item/USPrice/text()");
                int i = -1;
                while ((i = ap.evalXPath()) != -1)
                {
                    Console.WriteLine(" USPrice ==> " + vn.toString(i));
                }
            }
            catch (VTDException e)
            {
            }

        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer XimpleWare
United States United States
Jimmy Zhang is a cofounder of XimpleWare, a provider of high performance XML processing solutions. He has working experience in the fields of electronic design automation and Voice over IP for a number of Silicon Valley high-tech companies. He holds both a BS and MS from the department of EECS from U.C. Berkeley.

Comments and Discussions