private void WriteXmlFile(Outputmodels.POChinoOutput document, string path)
        {
            StringWriter  sw = new StringWriter();
            XmlTextWriter tw = null;

            try
            {
                tw             = new XmlTextWriter(path, Encoding.UTF8);
                tw.Formatting  = Formatting.Indented;
                tw.Indentation = 4;
                tw.WriteProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"");

                XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
                ns.Add("", "");

                XmlSerializer serializer = new XmlSerializer(document.GetType());
                serializer.Serialize(tw, document, ns);
            }
            catch (Exception ex)
            {
                _logger.LogError("WriteXmlFile - Error while generating xml file", ex, ex.Message);
            }
            finally
            {
                sw.Close();
                if (tw != null)
                {
                    tw.Close();
                }
            }
        }