コード例 #1
0
    public Attribute GetAttribute(String Name) {
      MetaTagAttributes attrs = new MetaTagAttributes();

      GetAttributes(attrs, Name, true);

      if (attrs.get_Count() > 0) return attrs.get_Item(0);
      else return null;
    }
コード例 #2
0
    /** @property */
    public String get_AttributeValue(String Name) {
      String strValue = "";
      Attribute attrName = attrList.GetAttribute(Name);

      if (attrName != null) strValue = attrName.value;

      return strValue;
    }
コード例 #3
0
    private void GetAttributes(MetaTagAttributes attrs, String Name, boolean stopAfterFirst) {
      Attribute attr;

      for (int x = 0; x < attrList.get_Count(); x++) {
        attr = get_Item(x);
        if (attr.name.equalsIgnoreCase(Name)) {
          attrs.Add(attr);
          if (stopAfterFirst) break;
        }
      }
    }