import java.io.File;
import java.io.IOException;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.module.XmlUtils;
import org.eclipse.tracecompass.tmf.analysis.xml.core.tests.Activator;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
ATTRIBUTE_FILE("test_xml_files/test_valid/test_attributes.xml"),
/** A valid file for conditions tests */
CONDITION_FILE("test_xml_files/test_valid/test_conditions.xml"),
+ /** A valid file for doubles tests */
+ DOUBLES_FILE("test_xml_files/test_valid/test_doubles.xml"),
/** A valid file for pattern tests */
- VALID_PATTERN_FILE("test_xml_files/test_valid/test_valid_pattern.xml");
+ VALID_PATTERN_FILE("test_xml_files/test_valid/test_valid_pattern.xml"),
+ /** A valid pattern file to test the pattern segment **/
+ VALID_PATTERN_SEGMENT("test_xml_files/test_valid/test_pattern_segment.xml");
private final String fPath;
/* Initialize the state provider module */
Document doc = null;
try {
- DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
- doc = dBuilder.parse(getFile());
- doc.getDocumentElement().normalize();
+ doc = XmlUtils.getDocumentFromFile(getFile());
} catch (ParserConfigurationException e) {
fail("Xml document parse exception");
} catch (SAXException e) {