/******************************************
 * VerifyXML.java
 * Uses the NVS shapefile library
 * and the NVision ShapeFile XML DTD
 * to validate a ShapeFile XML document.
 *
 *****************************************/

import java.io.*;
import com.nvs.shapefile.*;
import java.util.zip.*;
import java.io.*;
import java.util.*;
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;
import org.apache.xerces.parsers.*;

public class VerifyXML
{
	private static String strFile;
	
	public static void main(String args[])
	{
		if(args.length < 1)
		{
			System.out.println("Usage: VerifyXML <file>");
			return;
		}
		strFile = args[0];
		new VerifyXML();
	}
	
	public VerifyXML()
	{
		try
		{
			SAXBuilder builder = new SAXBuilder(true);		
			Document doc = builder.build(new FileInputStream(strFile));
			
			System.out.println("File passed.");
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return;
		}
	}
}