package daruma.xml.util;

import org.w3c.dom.Document;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

public class DOMDocumentFactory
{
	public	static	Document	create()
					  throws ParserConfigurationException
	{
		DocumentBuilderFactory	factory
					= DocumentBuilderFactory.newInstance();
		factory.setNamespaceAware( true );

		DocumentBuilder	builder;

		try
		{
			builder = factory.newDocumentBuilder();
		}
		catch( ParserConfigurationException  e )
		{
			throw e;
		}

		Document	doc = builder.newDocument();

		return( doc );
	}
}
