/// <summary>Creates an <code>XMPMeta</code>-object from a byte-buffer.</summary> /// <seealso cref="Parse(System.IO.InputStream, Com.Adobe.Xmp.Options.ParseOptions)"/> /// <param name="buffer">a String contain an XMP-file.</param> /// <param name="options">Options controlling the parsing.</param> /// <returns>Returns the <code>XMPMeta</code>-object created from the input.</returns> /// <exception cref="XMPException">If the file is not well-formed XML or if the parsing fails.</exception> /// <exception cref="Com.Adobe.Xmp.XMPException"/> public static XMPMeta ParseFromBuffer(sbyte[] buffer, ParseOptions options) { return(XMPMetaParser.Parse(buffer, options)); }
/// <summary> /// These functions support parsing serialized RDF into an XMP object, and serailizing an XMP /// object into RDF. /// </summary> /// <remarks> /// These functions support parsing serialized RDF into an XMP object, and serailizing an XMP /// object into RDF. The input for parsing may be any valid Unicode /// encoding. ISO Latin-1 is also recognized, but its use is strongly discouraged. Serialization /// is always as UTF-8. /// <p> /// <code>parseFromBuffer()</code> parses RDF from an <code>InputStream</code>. The encoding /// is recognized automatically. /// </remarks> /// <param name="in">an <code>InputStream</code></param> /// <param name="options"> /// Options controlling the parsing.<br /> /// The available options are: /// <ul> /// <li> XMP_REQUIRE_XMPMETA - The <x:xmpmeta> XML element is required around /// <tt><rdf:RDF></tt>. /// <li> XMP_STRICT_ALIASING - Do not reconcile alias differences, throw an exception. /// </ul> /// <em>Note:</em>The XMP_STRICT_ALIASING option is not yet implemented. /// </param> /// <returns>Returns the <code>XMPMeta</code>-object created from the input.</returns> /// <exception cref="XMPException">If the file is not well-formed XML or if the parsing fails.</exception> /// <exception cref="Com.Adobe.Xmp.XMPException"/> public static XMPMeta Parse(InputStream @in, ParseOptions options) { return(XMPMetaParser.Parse(@in, options)); }
/// <summary>Creates an <code>XMPMeta</code>-object from a string.</summary> /// <seealso cref="ParseFromString(string, Com.Adobe.Xmp.Options.ParseOptions)"/> /// <param name="packet">a String contain an XMP-file.</param> /// <param name="options">Options controlling the parsing.</param> /// <returns>Returns the <code>XMPMeta</code>-object created from the input.</returns> /// <exception cref="XMPException">If the file is not well-formed XML or if the parsing fails.</exception> /// <exception cref="Com.Adobe.Xmp.XMPException"/> public static XMPMeta ParseFromString(string packet, ParseOptions options) { return(XMPMetaParser.Parse(packet, options)); }