Ejemplo n.º 1
0
        public byte[] CreateByteArrSiteMapUTF8()
        {
            StringWriterUTF8 sw = new StringWriterUTF8();

            var xdoc = CreateXMLDocumentSitemap();
            xdoc.Save(sw);

            var utf16string = sw.ToString();

            var utf8tring = utf16string.Replace(UTF16_HEADER, UTF8_HEADER);

            return Encoding.Convert(Encoding.Unicode, Encoding.UTF8, Encoding.Unicode.GetBytes(utf8tring));
        }
Ejemplo n.º 2
0
        public byte[] CreateByteArrSiteMapUTF8()
        {
            StringWriterUTF8 sw = new StringWriterUTF8();

            var xdoc = CreateXMLDocumentSitemap();

            xdoc.Save(sw);

            var utf16string = sw.ToString();

            var utf8tring = utf16string.Replace(UTF16_HEADER, UTF8_HEADER);

            return(Encoding.Convert(Encoding.Unicode, Encoding.UTF8, Encoding.Unicode.GetBytes(utf8tring)));
        }