protected void assertElem(XMLStreamReader sr, String expURI, String expLN) throws XMLStreamException { assertEquals(expLN, sr.getLocalName()); String actURI = sr.getNamespaceURI(); if (expURI == null || expURI.length() == 0) { if (actURI != null && actURI.length() > 0) { fail("Expected no namespace, got URI '" + actURI + "'"); } } else { assertEquals(expURI, sr.getNamespaceURI()); } }