Skip to main content
summaryrefslogtreecommitdiffstats
blob: 1aa8866f52e4b0e0aa2e49b2341207682c051d4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*******************************************************************************
 * Copyright (c) 2013 Tasktop Technologies and others.
 * 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:
 *     Tasktop Technologies - initial API and implementation
 *******************************************************************************/

package org.eclipse.mylyn.internal.tasks.core;

import org.apache.xerces.parsers.SAXParser;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;

/**
 * Utility to create {@link XMLReader} instances. Uses Xerces if available to ensure XML 1.1 parsing works correctly.
 *
 * @author Steffen Pingel
 */
public class XmlReaderUtil {

	public static XMLReader createXmlReader() throws SAXException {
		// use Xerces to ensure XML 1.1 is handled correctly
		return new SAXParser();
	}

	private XmlReaderUtil() {
		// clients must not instantiate class
	}

}

Back to the top