Java examples for XML:DOM Node Value
get Document from XML Node
//package com.java2s; import org.w3c.dom.Document; import org.w3c.dom.Node; public class Main { private static Document getDoc(Node n) { if (n instanceof Document) return (Document) n; else//from w w w .j a v a2s.c om return n.getOwnerDocument(); } }