public Object unmarshal(Object obj, IUnmarshallingContext ictx)
throws JiBXException {
// verify the entry conditions
if (!(ictx instanceof UnmarshallingContext)) {
throw new JiBXException
("Unmarshalling context not of expected type");
} else if (m_name != null && !ictx.isAt(m_uri, m_name)) {
((UnmarshallingContext)ictx).throwStartTagNameError(m_uri, m_name);
}
// position to element start tag
m_unmarshalContext = (UnmarshallingContext)ictx;
m_unmarshalContext.toStart();
// unmarshal element to document model
try {
return unmarshalElement();
} catch (IOException e) {
throw new JiBXException("Error reading from document", e);
}
}