예제 #1
0
 /**
  * Parses a string path representing an XML file on disk into a StringWriter
  *
  * @param fromPath the file path represented as a String to use as the source
  * @param toWriter the destination StringWriter
  * @throws javax.xml.transform.TransformerException
  * @throws java.io.IOException
  */
 public static void transform(String fromPath, StringWriter toWriter)
     throws TransformerException, IOException {
   SubmissionUtils.transform(new File(fromPath), toWriter);
 }
예제 #2
0
 /**
  * Transforms a string path representing a file on disk into a DOM Document
  *
  * @param fromPath the file path represented as a String to use as the source
  * @param toDocument the destination Document
  * @throws javax.xml.transform.TransformerException
  * @throws java.io.IOException
  */
 public static void transform(String fromPath, Document toDocument)
     throws TransformerException, IOException {
   // Reader reader = bomCheck(new File(fromPath));
   UnicodeReader reader = new UnicodeReader(new FileInputStream(new File(fromPath)), "UTF-8");
   SubmissionUtils.transform(reader, toDocument);
 }