void () { XmlNSDescriptor NSDescriptor = createDescriptor( "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + "<xsd:element name=\"purchaseOrder\" type=\"PurchaseOrderType\"/>" + "<xsd:complexType name=\"PurchaseOrderType\">" + " <xsd:sequence>" + " <xsd:element name=\"shipTo\" type=\"USAddress\"/>" + " <xsd:element name=\"billTo\" type=\"USAddress\"/>" + " <xsd:element name=\"items\" type=\"Items\"/>" + " </xsd:sequence>" + "</xsd:complexType>" + "</xsd:schema>"); XmlTag tag = XmlTestUtil.tag("purchaseOrder", getProject()); XmlElementDescriptor elementDescriptor = NSDescriptor.getElementDescriptor(tag); XmlElementDescriptor[] elements = elementDescriptor.getElementsDescriptors(tag); assertEquals(3, elements.length); assertEquals("shipTo", elements[0].getName()); assertEquals("billTo", elements[1].getName()); assertEquals("items", elements[2].getName()); assertEquals("shipTo", elementDescriptor.getElementDescriptor(SHIP_TO, null).getName()); assertNull(elementDescriptor.getElementDescriptor(UNKNOWN_TAG, null)); }