try {
Content entityPrototype = (Content) this.getContentManager().getEntityPrototype(entityTypeCode);
SAXParserFactory parseFactory = SAXParserFactory.newInstance();
SAXParser parser = parseFactory.newSAXParser();
InputSource is = new InputSource(new StringReader(xml));
EntityHandler handler = this.getEntityHandler();
handler.initHandler(entityPrototype, this.getXmlAttributeRootElementName(), this.getCategoryManager());
parser.parse(is, handler);
return entityPrototype;
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "createEntityFromXml");
throw new ApsSystemException("Error on creation entity", t);