void () { XmlNSDescriptor NSDescriptor = createDescriptor( "<!ELEMENT orion-application (ejb-module*, persistence?, namespace-access)>" + "<!ELEMENT ejb-module ANY>" + "<!ELEMENT persistence ANY>" + "<!ELEMENT namespace-access ANY>"); XmlTag documentTag = tag("orion-application"); XmlElementDescriptorImpl elementDescriptor = (XmlElementDescriptorImpl)NSDescriptor.getElementDescriptor(documentTag); XmlElementDescriptor[] elements = elementDescriptor.getElementsDescriptors(documentTag); assertEquals(3, elements.length); assertEquals("ejb-module", elements[0].getName()); assertEquals("persistence", elements[1].getName()); assertEquals("namespace-access", elements[2].getName()); elements = elements[0].getElementsDescriptors(documentTag); assertEquals(4, elements.length); assertEquals("orion-application", elements[0].getName()); assertEquals("ejb-module", elements[1].getName()); assertEquals("persistence", elements[2].getName()); assertEquals("namespace-access", elements[3].getName()); }