Code example for Attributes

Methods: getLength

0
   * @param atts List of attributes to add to this list 
   */ 
  public void addAttributes(Attributes atts)
  { 
 
    int nAtts = atts.getLength();
 
    for (int i = 0; i < nAtts; i++)
    { 
      String uri = atts.getURI(i);
 
      if (null == uri)
        uri = "";
 
      String localName = atts.getLocalName(i);
      String qname = atts.getQName(i);
      int index = this.getIndex(uri, localName);
      // System.out.println("MutableAttrListImpl#addAttributes: "+uri+":"+localName+", "+index+", "+atts.getQName(i)+", "+this); 
      if (index >= 0)
        this.setAttribute(index, uri, localName, qname, atts.getType(i),
                          atts.getValue(i));