getAttrVal() public method

Get the token index of the attribute value given an attribute name.
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD etc can be generated by another /// machine from a load-balancer. ///
public getAttrVal ( System an ) : int
an System String ///
return int
Esempio n. 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="vn"></param>
        /// <param name="s"></param>
        /// <returns></returns>
        private bool lang(VTDNav vn, String s)
        {
            // check the length of s 
            bool b = false;
            vn.push2();
            try
            {
                while (vn.getCurrentDepth() >= 0)
                {
                    int i = vn.getAttrVal("xml:lang");
                    if (i != -1)
                    {
                        b = vn.matchTokenString(i, s);
                        break;
                    }
                    vn.toElement(VTDNav.P);
                }
            }
            catch (NavException e)
            {

            }
            vn.pop2();
            return b;
        }