}
private XmlSchemaElement getExistingSchemaElement(XmlSchema schema, QName qn) {
for (Iterator ite = schema.getItems().getIterator(); ite.hasNext();) {
XmlSchemaObject obj = (XmlSchemaObject)ite.next();
if (obj instanceof XmlSchemaElement) {
XmlSchemaElement xsEle = (XmlSchemaElement)obj;
if (xsEle.getQName().equals(qn)) {
return xsEle;
}