tmf: Add getDocumentFromFile() to XmlUtils
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.ui / src / org / eclipse / tracecompass / internal / tmf / analysis / xml / ui / module / TmfXmlAnalysisOutputSource.java
index 406bf0550af359a5f3cdd2a53473fd1492277098..bf668a74d304977473c5b401f667490486c3f31d 100644 (file)
@@ -17,8 +17,6 @@ import java.io.IOException;
 import java.util.List;
 import java.util.Map;
 
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.eclipse.jdt.annotation.NonNull;
@@ -151,11 +149,7 @@ public class TmfXmlAnalysisOutputSource implements ITmfNewAnalysisModuleListener
             }
 
             try {
-                /* Load the XML File */
-                DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
-                DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
-                Document doc = dBuilder.parse(xmlFile);
-                doc.getDocumentElement().normalize();
+                Document doc = XmlUtils.getDocumentFromFile(xmlFile);
 
                 /* get state provider views if the analysis has state systems */
                 if (module instanceof ITmfAnalysisModuleWithStateSystems) {
This page took 0.029892 seconds and 5 git commands to generate.