void () { XmlNSDescriptor NSDescriptor = createDescriptor( "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + "<xsd:element name=\"purchaseOrder\">" + "<xsd:complexType name=\"PurchaseOrderType\">" + " <xsd:sequence>" + " <xsd:element name=\"shipTo\">" + " <xsd:complexType name=\"USAddress\">" + " <xsd:sequence>" + " <xsd:element name=\"name\" type=\"xsd:string\"/>" + " <xsd:element name=\"street\" type=\"xsd:string\"/>" + " <xsd:element name=\"city\" type=\"xsd:string\"/>" + " <xsd:element name=\"state\" type=\"xsd:string\"/>" + " <xsd:element name=\"zip\" type=\"xsd:decimal\"/>" + " </xsd:sequence>" + " <xsd:attribute name=\"country\" type=\"xsd:NMTOKEN\" fixed=\"US\"/>" + " </xsd:complexType>" + " </xsd:element>" + " </xsd:sequence>" + "</xsd:complexType>" + "</xsd:element>" + "</xsd:schema>"); XmlTag tag = XmlTestUtil.tag("purchaseOrder", getProject()); XmlElementDescriptor elementDescriptor = NSDescriptor.getElementDescriptor(tag); XmlAttributeDescriptor[] attributes = elementDescriptor.getAttributesDescriptors(tag); assertEquals(0, attributes.length); XmlElementDescriptor[] elements = elementDescriptor.getElementsDescriptors(tag); assertEquals(1, elements.length); assertEquals("shipTo", elements[0].getName()); }