Java - The method replace() is undefined for the type OutputDocument

328 Views Asked by At

Hey i'm using Eclipse on a Java EE Project and it's showing the problem

The method replace(Element, String) is undefined for the type OutputDocument

I've already import the au.id.jericho.lib.html.OutputDocument library, i don't know what else to do

This is where it's used

for (Iterator i = linkStartTags.iterator(); i.hasNext();) {
     Element el = (Element)i.next();

     Attributes attributes = el.getAttributes();
     String rel = attributes.getValue(atributo);
     if ((rel != null) && (!"".equalsIgnoreCase(rel)))
     {

       if ((valores != null) && 
         (valores.containsKey(rel))) {
         String valor = (String)valores.get(rel);
         outputDocument.replace(el, valor);
       }
     }
   }

P.S I didn't write this code.

EDIT: I was using the wrong version of the library, i was using jericho-html-2.1 and i changed to jericho-html-2.3, now it's working, thanks

1

There are 1 best solutions below

0
On

Solution:

I was using the wrong version of the library, i was using jericho-html-2.1 and i changed to jericho-html-2.3, now it's working, thanks