Is there a way to add some delimiters(for example: to trim off the whitespaces and the newlines) to a Document object. I would like to do it at parse time, what would the code look like to add this functionality.
private static Document document;
private static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(new File(args));