473,503 Members | 1,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My xml create new verion on my Desktop

5 New Member
Good Day

I am creating my first internet explore add-in , my add-in combine between SR and TTS, the user will say any word and if the word in xml file the add-in will generate URL if not the add-in will display error MSG , also the user can add new word to xml file . the problem that I am facing now when setup my add-in and run it on internet explore error msg display and when click continue the new version of xml file will create on my desktop ,I saved xml file in debug file .



Expand|Select|Wrap|Line Numbers
  1. try
  2.             {
  3.                 XmlTextWriter writer = new XmlTextWriter("Grammar.xml", Encoding.UTF8);
  4.                 writer.Formatting = Formatting.Indented;
  5.  
  6.                 writer.WriteStartDocument();
  7.                 writer.WriteStartElement("grammar");
  8.                 writer.WriteAttributeString("xmlns", "http://www.w3.org/2001/06/grammar");
  9.                 writer.WriteAttributeString("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
  10.                 writer.WriteAttributeString("xml:lang", "en-US");
  11.                 writer.WriteAttributeString("version", "1.0");
  12.                 writer.WriteAttributeString("root", "command1");
  13.                 writer.WriteStartElement("rule ");
  14.                 writer.WriteAttributeString("id", "command1");
  15.                 writer.WriteAttributeString("scope", "public");
  16.                 writer.WriteStartElement("one-of");
  17.  
  18.  
  19.                 foreach (string item in listBox1.Items)
  20.                 {
  21.                     writer.WriteStartElement("item");
  22.                     writer.WriteString(item);
  23.                     writer.WriteEndElement(); //WORD
  24.                 }
  25.  
  26.                 writer.WriteEndElement(); //COMMAND
  27.                 writer.WriteEndElement();
  28.                 writer.WriteEndElement();
  29.                 writer.WriteEndDocument();// End Document
  30.  
  31.                 writer.Close();
  32.                 MessageBox.Show("THE NEW WORDS ADD TO THE XML FILE !!", "Message");
  33.             }

Thank u
Dec 5 '12 #1
0 1987

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

Similar topics

5
26991
by: Eskimo Joe | last post by:
I am trying to create a desktop icon using VB6. is this possible? -p
1
3839
by: Bodi | last post by:
Hello, Could someone please tell me if there is a way, or how do I change my html/javascript so that if I drag and drop a link from a webpage to the desktop in such a way that the name of the...
1
9231
by: A. Dionne | last post by:
Hi, I would like to know if it's still possible on Windows 2000 or XP to create a "Desktop Taskbar Application" (An application who attach it-self to the edges of the Desktop screen) in VB.NET...
2
3818
by: Jimi | last post by:
What is the .net namespace & class for creating desktop shortcuts?
7
31207
by: GrandpaB | last post by:
I would appreciate assistance learning how to create a Desktop shortcut in my setup project. In the left pane of the Setup/File System window I right-clicked User's Desktop. From the contex...
1
7241
by: Mike L | last post by:
How do I set the publish wizard to add a shortcut to the client's desktop?
2
3824
by: laredotornado | last post by:
Using PHP 4 and a custom icon (.ico) file, how could I create a file users download to their machine such that clicking on it launches their default web browser with a particular URL? Thanks for...
3
39350
by: thi | last post by:
Hi, How do i create an application shortcut on desktop programmically in C#? I have done some shortcut coding before in visual basic 6 using windows scripting host but later found out that...
3
2476
by: boris | last post by:
i am not able to understand how can i create google desktop api using only C and C++.should i also need to learn other languages or knowledge of my favourite c++ will do.I am confused.If it's...
6
2010
by: jojoba | last post by:
Hi, I am trying to create a .net webservice such that: When a user calls the service, the server creates a System.Windows.Forms.Form and shows it on the server screen. I know this sounds...
0
7086
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...
0
7280
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
7462
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
5578
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,...
1
5014
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...
0
4673
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...
0
3167
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.