I'm trying to use the StringEscapeUtils.escapeXML() function from org.apache.commons.lang...
There are two versions of that function, one which expects (Writer, String) and one which just expects (String)....
I'm trying to use the version that just expects the String parameter without the Writer, but Java is complaining that I've not given it a Writer.
How do I use this in my program so that I don't need a Writer?
String escXml = StringEscapeUtils.escapeXml(attr.get());
xml = xml.concat("<"+attr.getID()+">"+escXml+"</"+attr.getID()+">");
I've also tried just doing it inline in the string itself.
xml = xml.concat("<"+attr.getID()+">"+StringEscapeUtils.escapeXml(attr.get())+"</"+attr.getID()+">");
Both of these attempts have given me the error about it expecting the Writer though. Can anyone help me with this?
Thanks, Matt