-/*******************************************************************************\r
- * Copyright (c) 2010 Ericsson\r
- *\r
- * All rights reserved. This program and the accompanying materials are\r
- * made available under the terms of the Eclipse Public License v1.0 which\r
- * accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * Yuriy Vashchuk (yvashchuk@gmail.com) - Initial API and implementation\r
- *******************************************************************************/\r
-\r
-package org.eclipse.linuxtools.tmf.core.filter.xml;\r
-\r
-import java.io.IOException;\r
-\r
-import javax.xml.parsers.ParserConfigurationException;\r
-import javax.xml.parsers.SAXParserFactory;\r
-\r
-import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;\r
-import org.xml.sax.SAXException;\r
-import org.xml.sax.XMLReader;\r
-\r
-/**\r
- * The SAX based XML parser\r
- *\r
- * @version 1.0\r
- * @author Yuriy Vashchuk\r
- * @author Patrick Tasse\r
- */\r
-public class TmfFilterXMLParser {\r
-\r
- private static ITmfFilterTreeNode fRoot = null;\r
-\r
- /**\r
- * The XMLParser constructor\r
- *\r
- * @param uri The XML file to parse\r
- * @throws SAXException SAX exception\r
- * @throws IOException IO exception\r
- */\r
- public TmfFilterXMLParser(final String uri) throws SAXException, IOException {\r
-\r
- SAXParserFactory m_parserFactory = null;\r
- m_parserFactory = SAXParserFactory.newInstance();\r
- m_parserFactory.setNamespaceAware(true);\r
-\r
- XMLReader saxReader = null;\r
- try {\r
-\r
- saxReader = m_parserFactory.newSAXParser().getXMLReader();\r
- saxReader.setContentHandler(new TmfFilterContentHandler());\r
- saxReader.parse(uri);\r
-\r
- fRoot = ((TmfFilterContentHandler) saxReader.getContentHandler()).getTree();\r
-\r
- } catch (ParserConfigurationException e) {\r
- e.printStackTrace();\r
- }\r
- }\r
-\r
- /**\r
- * Getter of tree\r
- *\r
- * @return The builded tree\r
- */\r
- public ITmfFilterTreeNode getTree() {\r
- return fRoot;\r
- }\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2010 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yuriy Vashchuk (yvashchuk@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.core.filter.xml;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * The SAX based XML parser
+ *
+ * @version 1.0
+ * @author Yuriy Vashchuk
+ * @author Patrick Tasse
+ */
+public class TmfFilterXMLParser {
+
+ private static ITmfFilterTreeNode fRoot = null;
+
+ /**
+ * The XMLParser constructor
+ *
+ * @param uri The XML file to parse
+ * @throws SAXException SAX exception
+ * @throws IOException IO exception
+ */
+ public TmfFilterXMLParser(final String uri) throws SAXException, IOException {
+
+ SAXParserFactory m_parserFactory = null;
+ m_parserFactory = SAXParserFactory.newInstance();
+ m_parserFactory.setNamespaceAware(true);
+
+ XMLReader saxReader = null;
+ try {
+
+ saxReader = m_parserFactory.newSAXParser().getXMLReader();
+ saxReader.setContentHandler(new TmfFilterContentHandler());
+ saxReader.parse(uri);
+
+ fRoot = ((TmfFilterContentHandler) saxReader.getContentHandler()).getTree();
+
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Getter of tree
+ *
+ * @return The builded tree
+ */
+ public ITmfFilterTreeNode getTree() {
+ return fRoot;
+ }
+}