try {
final InputSource inputSource = new InputSource( is );
XmlDocument xmlDocument = MappingReader.INSTANCE.readMappingDocument(
cfg.getEntityResolver(),
inputSource,
new OriginImpl( "persistence-unit-info", xmlFile )
);
Element rootElement = xmlDocument.getDocumentTree().getRootElement();
if ( rootElement != null && "entity-mappings".equals( rootElement.getName() ) ) {
Element element = rootElement.element( "package" );
String defaultPackage = element != null ? element.getTextTrim() : null;