code: private final void replaceAll(final Element root,
              final Map<String, String> replacements) {
          String selector;    // Iterated selector
          String replacement; // Iterated HTML replacement
          Element replacementElem; // Iterated replacement
          Collection<Element> elements; // Selected elements
          Element replacementBody; // Body of the replacement
  
          for (final Entry<String, String> replacementEntry : replacements
                  .entrySet()) {
              selector = replacementEntry.getKey();
              replacement = replacementEntry.getValue();
  
              elements = root.select(selector);
              if (!elements.isEmpty()) {
                  // There are elements to replace
  
                  // Processes the replacement
                  replacementBody = Jsoup.parse(replacement).body();
                  if (!replacementBody.children().isEmpty()) {
                      replacementElem = replacementBody.child(0);
  
                      // Replaces the elements
                      for (final Element element : elements) {
                          element.replaceWith(replacementElem.clone());
                      }
                  }
              }
          }
      }
docs: Returns the result from replacing a collection of HTML elements on the
  received HTML code.
  <p>
  These elements are received as a {@code Map}, made up of pairs where the
  key is a CSS selector, and the value is the replacement for the selected
  element.
  
  @param root
  root element for the content to modify
  @param replacements
  {@code Map} where the key is a CSS selector and the value the
  element's replacement