•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 427,685 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,237 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 3705 | Replies: 1
![]() |
•
•
Join Date: Oct 2006
Location: Jordan
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
Hey all,
I got this problem regarding storing array of bytes (Length=589824) inside an XML document.
i tried using a memory stream and it did not work.
i also tried the following lines of code:
System.Text.Encoding.UTF8.GetString(Memory Stream.ToArray());
System.Text.Encoding.UTF8.GetString(byte[]);
the result was an empty string resulting inside the XML.
NOTE: i tried the above functions on a smaller array of bytes (length = 54) and it worked.
so please anyone who has the answer i will appreciate it.
thanks
I got this problem regarding storing array of bytes (Length=589824) inside an XML document.
i tried using a memory stream and it did not work.
i also tried the following lines of code:
System.Text.Encoding.UTF8.GetString(Memory Stream.ToArray());
System.Text.Encoding.UTF8.GetString(byte[]);
the result was an empty string resulting inside the XML.
NOTE: i tried the above functions on a smaller array of bytes (length = 54) and it worked.
so please anyone who has the answer i will appreciate it.
thanks
Need more info.
I assume (hah) you are using List. This would make it so much easier for you.
You can then lay down the foreach
I assume (hah) you are using List. This would make it so much easier for you.
List<byte> mybytes = new List<byte>(); mybytes.add(dabyte);
DataTable dt = new DataTable();
dt.Columns.Add("dabyte", byte);
foreach (byte b in mybytes)
{
dt.Rows.Add(object[] {b})
}
dt.WriteXML("C:\dabytes.xml"); Venjense
![]() |
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- [urgent] HTML form => XML file (JSP)
- multi dimensional array search xml parser (PHP)
- saving xml file from servlet request instance (Java)
- Unzip zipped xml file (VB.NET)
- problem reading xml file in c# (C#)
- parsing error (XML file-java-schema) (Java)
- Pass XML file contents to a hash table. (Java)
Other Threads in the C# Forum
- Previous Thread: External Installers
- Next Thread: Picture zoming


Linear Mode