matchRawTokenString() public method

Match the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets matched against This method has to take care of the underlying encoding conversion but it doesn't resolve entity reference in the underlying document
When 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 can be generated by another /// machine such as a load-balancer. ///
public matchRawTokenString ( int index, System s ) : bool
index int int (index into the VTD token buffer) ///
s System String ///
return bool
Ejemplo n.º 1
0
 private bool matchName(VTDNav vn)
 {
     int a;
     if (argCount1 == 1)
     {
         a = vn.getCurrentIndex();
         int type = vn.getTokenType(a);
         String s1 = argumentList.e.evalString(vn);
         if (type == VTDNav.TOKEN_STARTING_TAG
                 || type == VTDNav.TOKEN_ATTR_NAME
                 || type == VTDNav.TOKEN_PI_NAME)
         {
             try
             {
                 return vn.matchRawTokenString(a, s1);
             }
             catch (Exception e)
             {
                 return false;
             }
         }
         else
             return false;
     }
     else if (argCount1 == 2)
     {
         a = evalFirstArgumentListNodeSet2(vn);
         String s1 = argumentList.next.e.evalString(vn);
         try
         {
             if (a == -1 || vn.ns == false)
                 return s1.CompareTo("")==0;
             else
             {
                 int type = vn.getTokenType(a);
                 if (type == VTDNav.TOKEN_STARTING_TAG
                         || type == VTDNav.TOKEN_ATTR_NAME
                         || type == VTDNav.TOKEN_PI_NAME)
                     return vn.matchRawTokenString(a, s1);
                 return false;
             }
         }
         catch (Exception e)
         {
         }
         return false;
     }
     else
         throw new System.ArgumentException(
                 "matchName()'s argument count is invalid");
 }