public static void requireNamespace ( final XMLExtendedStreamReader reader , final Namespace requiredNs ) throws XMLStreamException { Namespace actualNs = Namespace . forUri ( reader . getNamespaceURI ( ) ) ; if ( actualNs != requiredNs ) { throw unexpectedElement ( reader ) ; } }
Require that the namespace of the current element matches the required namespace .