public static void applyNamespace(Namespace nsp, Element e) {

		// Assertions...
		if (nsp == null) {
			String msg = "Argument 'nsp' cannot be null.";
			throw new IllegalArgumentException(msg);
		}
		if (e == null) {
			String msg = "Argument 'e [Element]' cannot be null.";
			throw new IllegalArgumentException(msg);
		}

		if (e.getNamespace().equals(Namespace.NO_NAMESPACE)) {
			e.setQName(new QName(e.getName(), nsp));
			for (Object n : e.elements()) {
				applyNamespace(nsp, (Element) n);
			}
		}

	}
public static void applyNamespace ( Namespace nsp , Element e ) { if ( nsp == null ) { String msg = "Argument 'nsp' cannot be null." ; throw new IllegalArgumentException ( msg ) ; } if ( e == null ) { String msg = "Argument 'e [Element]' cannot be null." ; throw new IllegalArgumentException ( msg ) ; } if ( e . getNamespace ( ) . equals ( Namespace . NO_NAMESPACE ) ) { e . setQName ( new QName ( e . getName ( ) , nsp ) ) ; for ( Object n : e . elements ( ) ) { applyNamespace ( nsp , ( Element ) n ) ; } } }
Recursively applies the specified <code>Namespace</code> to the specified
<code>Element</code>, unless the <code>Element</code> (or any child
<code>Element</code>) already specifies a <code>Namespace</code>.

@param nsp Namespace to apply.
@param e XML structure upon which to apply the Namespace.