public static XMPMeta parse(Object input,ParseOptions options) throws XMPException {
  ParameterAsserts.assertNotNull(input);
  options=options != null ? options : new ParseOptions();
  Document document=parseXml(input,options);
  boolean xmpmetaRequired=options.getRequireXMPMeta();
  Object[] result=new Object[3];
  result=findRootNode(document,xmpmetaRequired,result);
  if (result != null && result[1] == XMP_RDF) {
    XMPMetaImpl xmp=ParseRDF.parse((Node)result[0]);
    xmp.setPacketHeader((String)result[2]);
    if (!options.getOmitNormalization()) {
      return XMPNormalizer.process(xmp,options);
    }
 else {
      return xmp;
    }
  }
 else {
    return new XMPMetaImpl();
  }
}

public static XMPMeta parse ( Object input , ParseOptions options ) throws XMPException { ParameterAsserts . assertNotNull ( input ) ; options = options != null ? options : new ParseOptions ( ) ; Document document = parseXml ( input , options ) ; boolean xmpmetaRequired = options . getRequireXMPMeta ( ) ; Object [ ] result = new Object [ 3 ] ; result = findRootNode ( document , xmpmetaRequired , result ) ; if ( result != null && result [ 1 ] == XMP_RDF ) { XMPMetaImpl xmp = ParseRDF . parse ( ( Node ) result [ 0 ] ) ; xmp . setPacketHeader ( ( String ) result [ 2 ] ) ; if ( ! options . getOmitNormalization ( ) ) { return XMPNormalizer . process ( xmp , options ) ; } else { return xmp ; } } else { return new XMPMetaImpl ( ) ; } }
parses the input source into an xmp metadata object , including de - aliasing and normalisation .
