Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.Document;

public class Main {
    public static String getContent(Document doc, String tagName) {
        //http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
        return doc.getElementsByTagName(tagName).item(0).getTextContent();
    }
}