473,799 Members | 3,146 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using a memory-resident XmlSchema with a DataSet?

I am attempting to write a DLL to maintain an XML file. It creates its own
XSD as an XmlSchema (or even a compiled member of an XmlSchemaSet, if
necessary).

I don't want to write an XSD to disk. The XML file, on the other hand, will
be disk resident.

System.Data.Dat aSet wants to read its schema in from an XmlReader, Stream,
TextReader, or file name string.

How does one get a System.Data.Dat aSet object to utilize a
System.Xml.Sche ma.XmlSchema object?
Feb 4 '07 #1
2 1529


"MyndPhlyp" <no****@homerig ht.nowwrote in message
news:O1******** ******@TK2MSFTN GP03.phx.gbl...
>I am attempting to write a DLL to maintain an XML file. It creates its own
XSD as an XmlSchema (or even a compiled member of an XmlSchemaSet, if
necessary).

I don't want to write an XSD to disk. The XML file, on the other hand,
will
be disk resident.

System.Data.Dat aSet wants to read its schema in from an XmlReader, Stream,
TextReader, or file name string.

How does one get a System.Data.Dat aSet object to utilize a
System.Xml.Sche ma.XmlSchema object?

Use an XmlNodeReader, MemoryStream or StringReader to read from in-memory
stuff.

David

Feb 4 '07 #2

"David Browne" <davidbaxterbro wne no potted me**@hotmail.co mwrote in
message news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
>

"MyndPhlyp" <no****@homerig ht.nowwrote in message
news:O1******** ******@TK2MSFTN GP03.phx.gbl...
I am attempting to write a DLL to maintain an XML file. It creates its
own
XSD as an XmlSchema (or even a compiled member of an XmlSchemaSet, if
necessary).

I don't want to write an XSD to disk. The XML file, on the other hand,
will
be disk resident.

System.Data.Dat aSet wants to read its schema in from an XmlReader,
Stream,
TextReader, or file name string.

How does one get a System.Data.Dat aSet object to utilize a
System.Xml.Sche ma.XmlSchema object?

Use an XmlNodeReader, MemoryStream or StringReader to read from in-memory
stuff.
Cool. Thanks. I also (just) discovered XmlDataDocument has Schemas and
DataSet properties (the latter of which has a ReadXml method) and was about
to retract the plea for assistance. (Amazing what one can find if one spends
enough time RTFM!) All this time I've been bogged down on XmlDocument,
StreamReader/Writer and other such things.
Feb 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
448
by: codymanix | last post by:
Last night I had several thought about RAII and want to discuss a bit. Why doesn't CSharp support destructors in structs? Wouldn't that make RAII possible like in C++? When the struct goes out of scope, the dtor could be immediately be called (no GC needed). For that, you don't have to declare the whole File class as a struct (which would be not good for performance when File has a lot of data-members). Instead creating a thin wrapper...
25
2280
by: rokia | last post by:
in a project, I use many,many stl such as stack,list,vctor etc. somewhere the vector's size is more than 2K. is this a efficient way?
2
3098
by: Evert Wiesenekker | last post by:
I have two instances of SQL Server running on my Development machine. I am having some performance problems and while investigating the problem I saw with the Process Explorer form Sysinternals that both instances consume each 800 Mbytes of memory! I experimented with sp_configure and by giving both instances a fixed memory size. Both methods do not seem to have any effect. Can anybody explain me why SQL Server is using so much memory?
10
14062
by: eyh5 | last post by:
Hi, My C code (running on Soalris Unix) has some "segmentation fault" that I wish to use purify to do it. I poked around the web, and found some information about adding some lines in a Makefile file to use purify. However, my code is a rather simple single-source C program, and I didn't write a Makefile for it. I'm wondering if anybody can tell me which commands are to be entered at the Unix prompt to use purify. And, I don't know if...
47
3544
by: Bonj | last post by:
I downloaded the gzlib library from zlib in order to do compression. (http://www.gzip.org/zlib) The prototype of the compression function seems to be int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); It is meant to be called by C, but I would rather use it from C#. So I wrote the following C# program to test it, but it failed to work. The call to compress doesn't return or throw an exception, it simply...
3
1844
by: lars.uffmann | last post by:
Hi everyone! I am debugging a big piece of code on the search for memory leaks, using g++ under suse 9.3. Since I'm trying to eliminate ALL memory leaks, I now stumbled upon a class foo that is not ever instantiated (thus no constructor or destructor ever called), but instead, all of its member variables are defined as static in the according .cpp file, and it's methods are invoked by calling foo::bar(...) to invoke method "bar(...)".
26
9332
by: myeates | last post by:
Hi Anyone ever done this? It looks like Python2.4 won't take a length arg Mathew
71
19141
by: desktop | last post by:
I have read in Bjarne Stroustrup that using malloc and free should be avoided in C++ because they deal with uninitialized memory and one should instead use new and delete. But why is that a problem? I cannot see why using malloc instead of new does not give the same result.
9
1787
by: chikkubhai | last post by:
Why is the result different for the following set of two code snippets Code without using this pointer #include <string> #include <iostream> using namespace std; struct X { private:
3
3238
by: not_a_commie | last post by:
The CLR won't garbage collect until it needs to. You should see the memory usage climb for some time before stabilizing. Can you change your declaration to use the 'out' keyword rather than a 'ref' keyword?
0
10490
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10243
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.