Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.IOException;

import org.w3c.dom.Element;

public class Main {
    private static void validateTagName(Element n, String expected) throws IOException {
        if (!n.getTagName().equalsIgnoreCase(expected)) {
            throw new IOException("Expected tag name '" + expected + "' but was '" + n.getTagName() + "'.");
        }
    }
}