473,218 Members | 1,394 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,218 software developers and data experts.

My xml create new verion on my Desktop

5
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 1980

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

Similar topics

5
by: Eskimo Joe | last post by:
I am trying to create a desktop icon using VB6. is this possible? -p
1
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
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
by: Jimi | last post by:
What is the .net namespace & class for creating desktop shortcuts?
7
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
by: Mike L | last post by:
How do I set the publish wizard to add a shortcut to the client's desktop?
2
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
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
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
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
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.