Here you can find the source of setAttribute(Element e, String key, String value)
Parameter | Description |
---|---|
e | a parameter |
key | a parameter |
value | a parameter |
public static void setAttribute(Element e, String key, String value)
//package com.java2s; //License from project: Apache License import org.jsoup.nodes.Element; public class Main { private static final String BALEEN_ATTRIBUTE_PREFIX = "data-baleen-"; /**// w w w. j a v a 2s . c o m * Set an attribute on an element (in the data-baleen namespace) * * @param e * @param key * @param value */ public static void setAttribute(Element e, String key, String value) { e.attr(attributeKey(key), value); } private static String attributeKey(String key) { return BALEEN_ATTRIBUTE_PREFIX + key; } }