Java BufferedReader Read loadXML(String fileName)

Here you can find the source of loadXML(String fileName)

Description

load XML

License

Open Source License

Declaration

public static String loadXML(String fileName) throws IOException 

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;

public class Main {
    public static String loadXML(String fileName) throws IOException {
        File mineContents = new File(fileName);
        BufferedReader reader = new BufferedReader(new FileReader(mineContents));
        StringBuffer mineXML = new StringBuffer();

        String str;/*from  ww w  .j ava  2  s  . co m*/
        while ((str = reader.readLine()) != null) {
            mineXML.append(str);
        }
        reader.close();

        return mineXML.toString();
    }
}

Related

  1. loadTxnDescriptions(String filename)
  2. loadTXTList(String listFile, int size)
  3. loadUnicodeStringFromFile(final File file)
  4. loadVocab(String vocabFilePath, double factor)
  5. loadWaypoints(File inFile)
  6. loadXMLDocumentFromClasspath(String resourcePath)
  7. loadY(InputStream filePath)
  8. readFile(File f)
  9. readFile(File f)