I'm still new to Xml, but finding it very useful.
Conceptually what I want to do is compress an XmlDocument, save it to SQL
Server as image data, read it back and restore it to an XmlDocument.
I'm a bit bewildered by the choices available (XmlSerialization, XmlWriter,
Xml on SQL Server) and do not have any experience with them, so I was
wondering what is the best way to do this? 5 3593
Jack Fox wrote: I'm still new to Xml, but finding it very useful.
Conceptually what I want to do is compress an XmlDocument, save it to SQL Server as image data, read it back and restore it to an XmlDocument.
I'm a bit bewildered by the choices available (XmlSerialization, XmlWriter, Xml on SQL Server) and do not have any experience with them, so I was wondering what is the best way to do this?
I believe the best, the simplest and probably the most effective is just
to serialize XmlDocument to string using Save() method. And to resore it
back just load XmlDocument from the string.
--
Oleg Tkachenko http://www.tkachenko.com/blog
Multiconn Technologies, Israel
Thanks, but all of the overloaded Save methods send it to some sort of
writer or file. The OuterXML property should suffice, then use the LoadXml
method to load it.
I thought some sort of easy compression method would be available, my
documents can get quite large.
"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:ey*************@TK2MSFTNGP11.phx.gbl... Jack Fox wrote:
I'm still new to Xml, but finding it very useful.
Conceptually what I want to do is compress an XmlDocument, save it to
SQL Server as image data, read it back and restore it to an XmlDocument.
I'm a bit bewildered by the choices available (XmlSerialization,
XmlWriter, Xml on SQL Server) and do not have any experience with them, so I was wondering what is the best way to do this?
I believe the best, the simplest and probably the most effective is just to serialize XmlDocument to string using Save() method. And to resore it back just load XmlDocument from the string. -- Oleg Tkachenko http://www.tkachenko.com/blog Multiconn Technologies, Israel
Jack Fox wrote: Thanks, but all of the overloaded Save methods send it to some sort of writer or file. The OuterXML property should suffice, then use the LoadXml method to load it.
OuterXML, Save, WriteTo, whatever - it's about the same, namely DOM serialization.
I thought some sort of easy compression method would be available, my documents can get quite large.
If XML is N Mb, then in-memory XmlDocument may be roughly 3N or 4N. Compress
serialized string instead.
--
Oleg Tkachenko http://www.tkachenko.com/blog
Multiconn Technologies, Israel
I cannot find any Method in the DotNet Framework that does compression,
except related to Passport and encryption of short strings (not megabytes).
Any suggestions?
Even without compression I have greatly enhanced the efficiency (elapsed
time) of my application by saving the OuterXML to SQL Server. The CPU used
for compression and decompression may actually prove detrimental, now that I
think of it. I will eventually have to implement selective cache purging,
but I'm not there yet.
"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:eb**************@TK2MSFTNGP11.phx.gbl... Jack Fox wrote:
Thanks, but all of the overloaded Save methods send it to some sort of writer or file. The OuterXML property should suffice, then use the
LoadXml method to load it. OuterXML, Save, WriteTo, whatever - it's about the same, namely DOM
serialization. I thought some sort of easy compression method would be available, my documents can get quite large. If XML is N Mb, then in-memory XmlDocument may be roughly 3N or 4N.
Compress serialized string instead. -- Oleg Tkachenko http://www.tkachenko.com/blog Multiconn Technologies, Israel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom Pearson |
last post by:
I have created an XmlDocument and can see that this is correctly formed and has a root element
If I Save the doc to a file and reload it all works o
If I dump the doc to a stream, again using the...
|
by: Carl Williams |
last post by:
Hope someone can help with this...
I have looked at all the newsgroup articles and put into practice all
the suggestions but to no good. I am pretty new to CSharp and .Net so
any help would be...
|
by: Glenn M |
last post by:
I have a shared XML file on a server .
i also have one xslt file that performs a simple transform on in to
view the data.
now i want to have another page that lets users modify the shared xml...
|
by: liuhengyi |
last post by:
Hi,
I have a test program that creates 5 threads and each thread uses
XmlDocument.Save(filename) to save a Xml dom to a file. I have put the
lock statement around the Save to prevent from...
|
by: Henok Girma |
last post by:
Hello Gurus,
I want to save the state of an unbound DataGridView on my Windows Form
application to an XML file so i can later load it back..
Basically, on my form I have a DataGridView, it's got...
|
by: liuliuliu |
last post by:
hi -- sorry if this is trivial -- but how do you make a screenshot of a
pygame display? i have a surface which is basically the entire visible
screen -- how do you write this surface as an image...
|
by: =?iso-8859-1?Q?Norbert_P=FCrringer?= |
last post by:
Hello there,
is it possible to write an XML document into a file, which has a readable
structure by using indents? By doubleclicking the xml file, you see a
readable XML structure in IE, but if...
|
by: blintrell |
last post by:
<?xml version="1.0" encoding="utf-8"?>
<root>
<groups>
<group gid="1" name="CSM">
<contact cid="1" />
<contact cid="2" />
<contact cid="3" />
<contact cid="4" />
...
|
by: Stephen Ward |
last post by:
I have a simple little project open a xml file change a few nodes save the
file, no big deal.
The problem is that the doctype is getting modified when I save the file.
So it looks like this:...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
| |