Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

public class Main {

    public static void main(String[] args) throws Exception {
        DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder domBuilder = domFactory.newDocumentBuilder();
        domBuilder.parse(args[0]);
        System.out.println("'" + args[0] + "' is well-formed.");
    }
}