Here you can find the source of getLastChildElement(Node start)
Parameter | Description |
---|---|
start | __UNDOCUMENTED__ |
public static Element getLastChildElement(Node start)
//package com.java2s; /*//from w ww .j ava 2s . co m * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ import org.w3c.dom.*; public class Main { /** * __UNDOCUMENTED__ * * @param start __UNDOCUMENTED__ * @return __UNDOCUMENTED__ */ public static Element getLastChildElement(Node start) { NodeList children = start.getChildNodes(); if (children != null) { int len = children.getLength(); Node n = null; for (int i = len - 1; i >= 0; i--) { n = children.item(i); if (n.getNodeType() == Node.ELEMENT_NODE) { return ((Element) n); } } } return null; } }