Java XML Has Child hasChildElement(TreeWalker walker)

Here you can find the source of hasChildElement(TreeWalker walker)

Description

has Child Element

License

Apache License

Declaration

public static boolean hasChildElement(TreeWalker walker) 

Method Source Code

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

import org.w3c.dom.Node;

import org.w3c.dom.traversal.TreeWalker;

public class Main {
    public static boolean hasChildElement(TreeWalker walker) {
        Node current = walker.getCurrentNode();
        Node child = walker.firstChild();
        if (child != null) {
            walker.setCurrentNode(current);
            return true;
        }/*from ww  w.  j a  v a 2s .  co m*/
        return false;
    }
}

Related

  1. hasChild(Element start, String name)
  2. hasChild(Node n)
  3. hasChildElement(Element elem, String namespace, String localName)
  4. hasChildElement(Element element, String name)
  5. hasChildElement(NodeList list)
  6. hasChildElementNodes(@Nonnull final Node aStartNode)
  7. hasChildElements(Element element)
  8. hasChildElements(Element element)
  9. hasChildElements(Element element)