Java tutorial
//package com.java2s; import org.w3c.dom.Document; import org.w3c.dom.Node; public class Main { public static Node getNode(Document dom, String key) { Node node = dom.getElementsByTagName(key).item(0); if (node == null) { return null; } return node; } }