Java XML Element Root getRootElement(Document document)

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

Description

Get root element of XML file

License

Apache License

Parameter

Parameter Description
document XML document

Return

The root element of the XML document

Declaration

public static Element getRootElement(Document document) 

Method Source Code

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

import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class Main {
    /**/*from w  w  w  .j a v a2  s  . c  o  m*/
     * Get root element of XML file
     * 
     * @param document
     *            XML document
     * @return The root element of the XML document
     */
    public static Element getRootElement(Document document) {
        return document.getDocumentElement();
    }
}

Related

  1. getRootElement(Document d)
  2. getRootElement(Document doc)
  3. getRootElement(Document doc)
  4. getRootElement(Document doc)
  5. getRootElement(Document document)
  6. getRootElement(Document parent)
  7. getRootElement(final Element descendant)
  8. getRootElement(final File definition)
  9. getRootElement(final String respuestaPost)