tmf: Add getDocumentFromFile() to XmlUtils
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core / src / org / eclipse / tracecompass / internal / tmf / analysis / xml / core / module / XmlAnalysisModuleSource.java
index 0e7cdff7a5ee103a06ccb45d2e2d52e8c493c32a..8900602e60bd18ec29135db8b7b156aeaad46aaa 100644 (file)
@@ -20,8 +20,6 @@ import java.util.ArrayList;
 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.core.runtime.FileLocator;
@@ -94,11 +92,7 @@ public class XmlAnalysisModuleSource implements IAnalysisModuleSource {
         }
 
         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 Providers modules */
             NodeList stateproviderNodes = doc.getElementsByTagName(TmfXmlStrings.STATE_PROVIDER);
This page took 0.024432 seconds and 5 git commands to generate.