Here you can find the source of clearAttributes(Attributes attributes, Map
Parameter | Description |
---|---|
key | a parameter |
attributes | a parameter |
public static void clearAttributes(Attributes attributes, Map<String, Integer> tagCache)
//package com.java2s; //License from project: Open Source License import java.util.Map; import org.xml.sax.Attributes; public class Main { /**/* w w w. j av a 2 s.co m*/ * I should have documented these properly when I first wrote them. * It looks like tagCache is initialized by clearAttributes and then * accessed by getAttribute * @param key * @param attributes * @return */ public static void clearAttributes(Attributes attributes, Map<String, Integer> tagCache) { final int attributesLength = attributes.getLength(); for (String key : tagCache.keySet()) { tagCache.put(key, -1); } for (int i = 0; i < attributesLength; i++) { String name = attributes.getLocalName(i); tagCache.put(name, i); } } }