Monday, June 16, 2008

XPathNodeIterator - Microsoft ASP.NET

XPathNodeIterator iterator = navigator.Select(
    "productData/categories/category[@name='category']/tariffs/tariff[@id='nn']/networks/network");
while (iterator.MoveNext())
{
    XPathNodeIterator products = 
        iterator.Current.Select("products/product"); 
    while (products.MoveNext()) 
    {
        XPathNavigator productNavigator = 
            products.Current; XPathNodeIterator prodDetails = 
                productNavigator.SelectDescendants(XPathNodeType.Text, false); 
                    String name, link; 
        while (prodDetails.MoveNext()) 
        {
            if (prodDetails.CurrentPosition == 1) name = prodDetails.Current.Value; 
                if (prodDetails.CurrentPosition == 2) link = prodDetails.Current.Value;
 
        } 
    /// utilize your strings here
    }
}

No comments:

Azure Storage Account Types

Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...