473,794 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XMLDocument.Wri teXML question

hello i have to know if the writeXML process is a blocking process.
Other mean if i write

doc.WriteXML();
int i = 0;

Is i = 0 can be executed before doc.WriteXML() method ended????
All this when the data we have to save can need up to 2 3 seconds.

I think it's not blocking according to what I see in my application.

If really non blocking how can I solve my problem to make it blocking.
All this because my doc.WriteXML() is done in mainform_closin g event.
So not all the data will be saved until the application will be closed..
Thank by advance for answers.
Nov 12 '05 #1
1 1381
Jacky wrote:
hello i have to know if the writeXML process is a blocking process.
Other mean if i write

doc.WriteXML();
int i = 0;

Is i = 0 can be executed before doc.WriteXML() method ended????
All this when the data we have to save can need up to 2 3 seconds.

I think it's not blocking according to what I see in my application.

If really non blocking how can I solve my problem to make it blocking.
All this because my doc.WriteXML() is done in mainform_closin g event.
So not all the data will be saved until the application will be closed..


XmlDocument class has no WriteXml() method.
When you write something to a writer/stream you need to close it before
application is terminated, otherwise some data can be lost due to buffering.

--
Oleg Tkachenko [XML MVP, MCAD]
http://www.XmlLab.Net | http://www.XLinq.Net | http://blog.tkachenko.com
Nov 12 '05 #2

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

Similar topics

1
5766
by: Matt M | last post by:
Hey, I'm trying to pass an XML document from a webservice to another assembly. What I'd like to do is pass either an XML document or a dataset, so I figure that if I can turn the Dataset into an XMLDocument, then in my assembly, return that XMLDocument back to the dataset (if it is one), I will be good to go. Problem is, I haven't been able to find out how to transform a dataset into
3
4830
by: Gordon Moore | last post by:
Hi, I'm new to using xml/xslt and although I can create an xml document using the dataset.WriteXml statement, and I have created an xslt to transform the xml into the output I want, I have to manually add the xsl reference statement to the xml file. i.e. <?xml version="1.0" standalone="yes"?> <?xml:stylesheet type="text/xsl" href="Questions.xsl"?> --> I have to
4
2461
by: David Thielen | last post by:
Hi; I have nodes in the XmlDocument I create that need to be written exactly as is - not converting < to %lt; and no changing the whitespace. (This is for the SpreadsheetML schema and it reads the <Data> nodes literally.) How can I do this? -- thanks - dave
1
1638
by: Martin | last post by:
Hi, I am manipulating an xmldocument class object. at present when I want the schema wrote wrote out I am reading the xmldocument object into a dataset and then writing the dataset to file usring the writexml mthod withe the xmlwritemode schama flag. this gives me the full xmldocument plus the schema in the resulting file.
12
5317
by: Whoever | last post by:
Hi, I'm trying to return an XmlDocument or XmlNode converted from a typed dataset. public XmlNode whatever() { MyTypedDataSet ds = new MyTypedDataSet(); return new XmlDataDocument(ds); }
1
3735
by: JoshKaos | last post by:
I am in the process of rewriting a WebService. The WebMethods are all returning XMLDocuments. First, they get a Dataset of records and then walk through the Dataset to populate the XMLDocument which is then passed to the Web application which then pushes the XMLDocument into a Dataset in order to use the data. Now my question is should I just skip the XMLDocument process and just pass the Dataset itself back from the WebService? Is...
6
28487
by: Brett Romero | last post by:
I have a DataTable with one column. How can I load that into an XMLDocument object? XMLDocument.Load() or LoadXML() will not take a DataTable. Thanks, Brett
1
1824
by: olrt | last post by:
Hello, I have designed a WebService with the following method : public DbAppAnswer GetDs(DbAppRequest request) DbAppRequest and DbAppAnswer are defined as :
2
1688
by: Tony Johansson | last post by:
Hello! Assume the following : 1. I create a DataSet with some DataRelation. 2. I then use WriteXml to write the DataSet to an Xml document using DataRelation.Nested = True 3.I then read the Xml document using ReadXml to load and create a DataSet. Now to my question is this DataSet that was created from 3 the same DataSet with the same structure
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10435
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...
0
10213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
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
10000
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...
1
7538
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
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...
1
4113
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

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.