473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Is it possible to embed a .zip file in XML string in C#?

sovitagar
Hi,
I am doing a project in C# wherein i need to send a xml string from server to client using TCP connection. The xml string requires to contain some data which the client can parse.My question is whether we can embed/include a .zip file or any other file as a tag value within this xml string ?
Please help...
Thanks in advance!!!
Apr 9 '14 #1

✓ answered by Dormilich

in principle you cannot embed binary data in XML. of course you can insert the string representation of the binary data or base64 encoded data into the XML code. whether the XML parser on the other side can work with that is another question.

and of course you dramatically increase the XML’s file size doing that.

8 2611
Dormilich
8,658 Expert Mod 8TB
in principle you cannot embed binary data in XML. of course you can insert the string representation of the binary data or base64 encoded data into the XML code. whether the XML parser on the other side can work with that is another question.

and of course you dramatically increase the XML’s file size doing that.
Apr 9 '14 #2
Thanks Dormilich!!!
You mean to say that we cannot insert any data apart from the string representation of the binary data into the xml string?
So there's no way to insert even a text file into a xml string?
Apr 9 '14 #3
Dormilich
8,658 Expert Mod 8TB
it shouldn’t be too difficult to get the string representation of a plain text file’s text.
Apr 9 '14 #4
So can you help me out with embedding string representation of the binary data in a xml?
Like I don't know as to how can we embed the same in a xml...
Apr 10 '14 #5
Dormilich
8,658 Expert Mod 8TB
I’d try file_get_contents()
Apr 10 '14 #6
Well if you could help me out with something in C#....
Coz my project is in C#
Thanks So much!!!
Apr 10 '14 #7
Dormilich
8,658 Expert Mod 8TB
I don’t know C#. just JavaScript and PHP.
Apr 10 '14 #8
Anyways...Thanks a ton!!! :)
Apr 10 '14 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: David Sobey | last post by:
Hi Sorry bout this basic prob. Got a file called file.obj. tryna read the first line from it as a string and print it to the screen. getting errors: #include "stdafx.h" #include <stdio.h>...
6
by: NickName | last post by:
Env: SQL Server 2000 on in WIN NT 5.x Job: import mutiple flat files into several tables daily. Catch: one or two of the several flat files might be empty. First thought/test: Use option for...
5
by: bissatch | last post by:
Hi, I have just managed to install DOMXML on my apache/PHP setup. I am running PHP 4.3.0 and Apache2. $xmldoc = domxml_open_file("inc/menu.xml", DOMXML_LOAD_DONT_KEEP_BLANKS); When I try...
1
by: acool | last post by:
If I have an XML file in a string variable what is the best way to go about deleting specific Nodes or elements from this file??
2
by: theinvisibleGhost | last post by:
Subject says it all really. I'm being passed a string, and I'm wondering if theres an easy way to determine what exactly the string points at? Cheers Chris.
2
by: Nikolay Petrov | last post by:
I would like to embed a file in my EXE and extract it at runtime. Is this possible? If so how? the file is a MS Access Database. Would like to check if the file doesn't exists in the application...
0
by: Yasin cepeci | last post by:
is it possible that read string values in a filled dataset?
7
by: rinkudhimar | last post by:
I am finding certain text and replacing it in the file. But it gets written three times in the file. I am sending the code. *******************HTML CODE********************************* <!DOCTYPE...
5
by: Pawel_Iks | last post by:
Hello! I want to use following statement to pass command-line arguments into main function: int main(int argc, string argv) { if (argc>0) { //do something
7
by: DannyMc | last post by:
Hi , i am in the middle of creating the script to match the string and replace it in mount.txt mickey:/work1 /work1 bla bla bla mickey:/work2 /work2 bla bla bla micket:/job /job bla bla bla
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.