Java XML Document Print printDocument(File file)

Here you can find the source of printDocument(File file)

Description

print Document

License

Open Source License

Declaration

public static String printDocument(File file) throws IOException, TransformerException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.BufferedReader;
import java.io.File;

import java.io.FileReader;
import java.io.IOException;
import javax.xml.transform.TransformerException;

public class Main {
    public static String printDocument(File file) throws IOException, TransformerException {
        BufferedReader br = new BufferedReader(new FileReader(file));
        String line = null, fileContent = "";
        while ((line = br.readLine()) != null) {
            fileContent += line + "--";
        }/*  www .  ja va  2 s  .c o  m*/
        return fileContent;
    }
}

Related

  1. printDocument(final Document doc)
  2. printDocument(Node _docOrNode, OutputStream _outStream)
  3. printDocument(Node doc)
  4. printDocumentToStdout(final Document document)