added skeleton java files

git-svn-id: svn://anubis/gvsu@120 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-06-10 00:56:23 +00:00
parent b9bb5cce1c
commit aabe876290
3 changed files with 48 additions and 1 deletions

40
cs675/dom_sax/JDOM.java Normal file
View File

@ -0,0 +1,40 @@
import javax.xml.parsers.*;
import org.w3c.dom.*;
public class JDOM
{
public static int main(String args[])
{
if (args.length != 1)
{
System.err.println("Usage: java JDOM <XMLFile>");
return 42;
}
JDOM j = new JDOM();
return j.parse(args[0]);
}
public int parse(String file)
{
Document doc = null;
try
{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
doc = db.parse(file);
if (doc != null)
printHTMLSchedule(doc);
return 0;
}
catch (Exception e)
{
System.out.println(e.getMessage());
return 1;
}
}
private void printHTMLSchedule(Document d)
{
}
}

7
cs675/dom_sax/JSAX.java Normal file
View File

@ -0,0 +1,7 @@
public class JSAX
{
public static void main(String args[])
{
}
}

View File

@ -1,3 +1,3 @@
all:
xmllint --noout --schema dailyplanner-schema.xsd test-sched.xml
javac *.java