/// <summary> /// Converts the invoice xml into SaleInvoice object. /// </summary> /// <param name="xmlInvoice">The xml that represents the invoices.</param> /// <returns>An array of invoices.</returns> /// <exception cref="XmlException">Thrown when xmlInvoice does not represent a valid XML text.</exception> public static SalesInvoice[] GetInvoicesFromXml(string xmlInvoice) { List <SalesInvoice> invoices = InvoiceHelper.ConvertXmlToSaleInvoice(xmlInvoice); return(invoices.ToArray()); }