Here you can find the source of isNil(Element aElement)
Parameter | Description |
---|---|
aElement | element to test. |
public static boolean isNil(Element aElement)
//package com.java2s; import org.w3c.dom.*; import javax.xml.XMLConstants; public class Main { /**/*from w ww . ja va 2s .c o m*/ * Returns true if the element is null or if it has xsi:nil attribute value of "true". * * @param aElement element to test. * @return if element is null or nil. */ public static boolean isNil(Element aElement) { if (aElement != null) { return "true".equals(aElement.getAttributeNS(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil")); //$NON-NLS-1$//$NON-NLS-2$ } else { return true; } } }