Java XML Element Root getRootNode(Document document)

Here you can find the source of getRootNode(Document document)

Description

get Root Node

License

Apache License

Declaration

public static Node getRootNode(Document document) 

Method Source Code


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

import org.w3c.dom.Document;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class Main {
    public static Node getRootNode(Document document) {
        NodeList nodeList = document.getChildNodes();
        return nodeList.item(0);
    }/*  ww  w. j a  va 2 s .co  m*/
}

Related

  1. getRootElementPosition(String buf, Element root)
  2. getRootFaceletElement(Document document)
  3. getRootFromPom(File pomFile)
  4. getRootFromString(String str)
  5. getRootNode(Document doc, String nodeName)
  6. getRootNode(final String xmlContent)
  7. getRootTagName(String xml)