root.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns", uri);
doc.appendChild(root);
for (Iterator iter = pContextList.iterator(); iter.hasNext(); ) {
Object o = iter.next();
Context ctx;
if (o instanceof ObjectSG) {
ctx = ((ObjectSG) o).getClassContext();
} else {
ctx = ((TypeSG) o).getComplexTypeSG().getClassContext();
}
String packageName = ctx.getXMLInterfaceName().getPackageName();
if (packageName == null) {
packageName = "";
}
if (!packageName.equals(pPackageName)) {
continue;
}
Element manager = doc.createElementNS(uri, "Manager");
root.appendChild(manager);
manager.setAttributeNS(null, "elementInterface", ctx.getXMLInterfaceName().toString());
manager.setAttributeNS(null, "elementClass", ctx.getXMLImplementationName().toString());
manager.setAttributeNS(null, "handlerClass", ctx.getXMLHandlerName().toString());
manager.setAttributeNS(null, "marshallerClass", ctx.getXMLSerializerName().toString());
manager.setAttributeNS(null, "validatorClass", ctx.getXMLValidatorName().toString());
if (o instanceof ObjectSG) {
manager.setAttributeNS(null, "qName", ((ObjectSG) o).getName().toString());
}
}
return doc;