code: public String replaceAll(String content, Map<String, String> replacements) {
  
  		Element body = parseContent(content);
  		
  		boolean modified = false;
  		for (Entry<String, String> replacementEntry : replacements.entrySet()) {
  			String selector = replacementEntry.getKey();
  			String replacement = replacementEntry.getValue();
  			
  			List<Element> elements = body.select(selector);
  			if (elements.size() > 0) {
  				
  				// take the first child
  				Element replacementElem = parseContent(replacement).child(0);
  				
  				if (replacementElem != null) {
  					for (Element element : elements) {
  						element.replaceWith(replacementElem.clone());
  					}
  					
  					modified = true;
  				}
  			}
  		}
  		
  		if (modified) {
  			return body.html();
  		} else {
  			// nothing changed
  			return content;
  		}
  	}
docs: Replaces elements in HTML.
  
  @param content
  HTML content to modify
  @param replacements
  Map of CSS selectors to their replacement HTML texts. CSS selectors find elements
  to be replaced with the HTML in the mapping. The HTML must parse to a single
  element.
  @return HTML content with replaced elements. If no elements are found, the original content
  is returned.
  @since 1.0