How to write multiple Name space

Can someone show me how to write the following fragment out, using 
xmlwriter. Thanks



<Message key="comp" xmlns="http://www.xxx.com"
 xmlns:j="http://www.yyy.com">
</Message> 


0
aaa8757 (25)
5/19/2008 3:35:08 PM
dotnet.xml 7266 articles. 0 followers. Follow

3 Replies
766 Views

Similar Articles

[PageSpeed] 58

Phil Hunt wrote:
> Can someone show me how to write the following fragment out, using 
> xmlwriter. Thanks
> 
> 
> 
> <Message key="comp" xmlns="http://www.xxx.com"
>  xmlns:j="http://www.yyy.com">
> </Message> 

Write the 'Message' element in its namespace 'http://www.xxx.com', then 
write two attributes:

                 writer.WriteStartElement("Message", "http://www.xxx.com");
                 writer.WriteAttributeString("key", "comp");
                 writer.WriteAttributeString("xmlns", "j", 
"http://www.w3.org/2000/xmlns/", "http://www.yyy.com");
                 writer.WriteEndElement();


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1777)
5/19/2008 4:01:40 PM
TIA, I will take a look later.


"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:%23KC3jmcuIHA.4736@TK2MSFTNGP04.phx.gbl...
> Phil Hunt wrote:
>> Can someone show me how to write the following fragment out, using 
>> xmlwriter. Thanks
>>
>>
>>
>> <Message key="comp" xmlns="http://www.xxx.com"
>>  xmlns:j="http://www.yyy.com">
>> </Message>
>
> Write the 'Message' element in its namespace 'http://www.xxx.com', then 
> write two attributes:
>
>                 writer.WriteStartElement("Message", "http://www.xxx.com");
>                 writer.WriteAttributeString("key", "comp");
>                 writer.WriteAttributeString("xmlns", "j", 
> "http://www.w3.org/2000/xmlns/", "http://www.yyy.com");
>                 writer.WriteEndElement();
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 


0
aaa8757 (25)
5/19/2008 5:40:08 PM
Thanks, that did it.


"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:%23KC3jmcuIHA.4736@TK2MSFTNGP04.phx.gbl...
> Phil Hunt wrote:
>> Can someone show me how to write the following fragment out, using 
>> xmlwriter. Thanks
>>
>>
>>
>> <Message key="comp" xmlns="http://www.xxx.com"
>>  xmlns:j="http://www.yyy.com">
>> </Message>
>
> Write the 'Message' element in its namespace 'http://www.xxx.com', then 
> write two attributes:
>
>                 writer.WriteStartElement("Message", "http://www.xxx.com");
>                 writer.WriteAttributeString("key", "comp");
>                 writer.WriteAttributeString("xmlns", "j", 
> "http://www.w3.org/2000/xmlns/", "http://www.yyy.com");
>                 writer.WriteEndElement();
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 


0
aaa8757 (25)
5/19/2008 10:26:34 PM
Reply:

Similar Artilces:

multiple CD's, same bank
I've got multiple CD's opened up at the same bank. They are all under the same account number, but each under a separate heading. Each of the CD's mature at a different time, and they will be rolled over into new CD's over the next 18 years. Futhermore, my bank provides online banking services directly within MS Money, including automated download of statements. So...what would be the best way to set up these accounts in Money? Should I create one account named CD and then make a cash transaction for each CD? Should I set up each CD as an individual investment accou...

what is the function and name is of the symbol in each table cell.
Under Paragraph I clicked the Show/Hide Symbol icon so I can now see a symbol at the end of each text within a table cell. I wondered what that is so I tried to use Help to find out. I did find help that mapped a word (like paragraph) into a symbol. But I can't find anywhere where if I know the symbol it will tell me the meaning. Can you tell me how to find such info? Or maybe you can tell me what the function and name is of the symbol in each table cell. Thanks I'm sorry, I meant to sent this to the Word group. Of course, I wouldn't mind getting the info...

One Entry to Multiple Rows
I have data that looks like this: X1 | Y1 Y2 Y3 Y4 X2 | Y4 Y5 Y6 Y7 And I need to get to: X1 | Y1 X1 | Y2 X1 | Y3 X1 | Y4 X2 | Y4 ...... etc. I can change the 2nd row's entries to more columns, but that doesn't seem to get me much closer to the needed format (and there are thousands of lines so I'd rather not do it manually). Any ideas? should do it. change mc to suit '===== Option Explicit Sub lineemup() Dim mc As Long Dim mr As Long Dim i As Long Dim lc As Long mc = 3 'col c mr = 1 For i = 1 To Cells(Rows.Count, mc).End(xlUp).Row lc ...

Downloading multiple messages
All of a sudden outlook has started downloading multiple messages from my pop account (ie 22 of the same) It is also sending out 22 of the same message. How can I resolve this issue? What version of Outlook do you have? Does it download duplicates of *all* messages, or just of one or two messages? -- Jeff Stephenson Outlook Development This posting is provided "AS IS" with no warranties, and confers no rights "GW" <anonymous@discussions.microsoft.com> wrote in message news:005101c3bf4c$e748bf30$a501280a@phx.gbl... > All of a sudden outlook has started do...

Suggest Names While Completing .....
Is there anyway to remove a "suggested name" short of actually turning this feature off? Our CEO's PA has returned from leave but her home email address keeps popping up as an option. Ta Ian When Outlook suggests the name, highlight it with the arrow keys and then press the delete key. "Ian Kynaston" <IKynaston@nospam.propertyoz.com.au> wrote in message news:554f01c4743a$a34b6910$a601280a@phx.gbl... > Is there anyway to remove a "suggested name" short of > actually turning this feature off? > > Our CEO's PA has returned from leave b...

Excel ask duplicate NAMES when duplicate a worksheets
I have added a NAME called "Above" where point to the cell just above the current cell. The formula is "=INDIRECT("R[-1]C",)" In some workbook, when I duplicate a worksheets, this name will remain silent and work ok. But in some workbooks, when I first duplicate a worksheets, the same name ABOVE will be duplicate and a new local name (belongs to that new worksheet) will be created. If I further duplicate that new worksheets in to a new worksheets, the third worksheets will be warned that a dupicate NAME is existed and ask whether refer to another name or use a ne...

How to write a new entry in a combo box to its underlying table
Dear Access 2007 VBA Gurus, I have a assets database (rather uncreatively named "Assets"). I use a form (named "Asset Acquisition Input Form New") to enter new assets. The "Manufacturer" field (combo box name "Manufacturers_ID) on this form is a lookup to a Manufacturers table. What I want to happen is when I enter an item that is not in the lookup list, I want a message box to prompt me to add the new entry to the underlying table, or to cancel and select an item from the list. I have no trouble with the MsgBox command itself. What I don&...

Convert Double Space To Single Space
How do you convert double spaced text to single spaced? I don't see an option for this in Outlook. I can paste into Notepad, copy and then paste into Outlook, but I would prefer a way to do it within Outlook. ...

how to automatically suppress space before after column break?
Having Spacing Before and After on some of the styles, I seem to be unable to have the space before at the beginning of a column automatically dismissed when applying a column break. I have tried a couple of options under compatibility, but to no avail. This in on Word 2003. The No HTML function + No Space Before after column break do not solve the problem. Can you help please? Tools | Options | Compatibility: Suppress Space Before after a hard page or column break. If this isn't working, then check to make sure you don't have an empty paragraph before the first text pa...

exchange 5.5 will not keep new server name.
We have exchange 5.5 in enviroment where windows server 2003 is setup along with active directory and active direcitory intergrated zone which is replicated to other servers. Problem: I enter the Exchange Server Name followed by the mailbox name then I select the button [CHECK NAME] In the exchange server name field after entering the new exchange server name the old exchange server name is displayed instead. This only happens in office 2003 professional and not in office 2000 professional "old exchange server name" How did you go about changing the name of the server...

Can I show server name instead of drive letter?
When using the =Cell("filename") function, I would like to show the actual server instead of a drive letter because the letter is dependent on where the server is mapped and not all users have the same mapping. Is this possible? Try using: \\ServerName\drive\... where ServerName is the name of the server and drive is the appropriate drive, and then find the file on the drive from that point. "bfant" wrote: > When using the =Cell("filename") function, I would like to show the actual > server instead of a drive letter because the letter is dependent on...

Multiple Language Issues
Hi all, Has anyone successfully manually updated a non-English supported 5.5 to 2003? (The reason for the manual update was a broken admin account.) Mail and contacts were all exported to PST files, and then imported to 2003. However, although the text of the messages is fine (English and Russian), the text for contact names and message subjects gets gorched if they contained any Russian text. Does anyone know the correct sequence to follow to take messages and contacts in Russian (or other languages) from 5.5 to 2003, while retaining the non-English subject lines and contact names? ...

Multiple Sales Transaction for Same Work Order
I am in the process of trying to create a store level report by department, catagory, and item of the moneys received in total by both deposit on work orders and on direct sales that are not work orders. We require a 100% deposit (of a single tender type) on work orders. I then need to break this deposit down by department, catagory and item. Then I must add that to the same break down for direct sales. Thereby getting a total of all moneys received during a specified period for the store across all registers. So basically I am trying to figure out the data structure and org...

get rid of extra spaces between paragraphs worked only once.
Changed style from Word 7 to Word 3, used help online, but still have 2 left with spaces I cannot get rid of on my last page. Got any help for me? -- Only fools and bigots prefer French over Spanish to be taught in public or private schools. In the Styles pane (Ctrl+Alt+Shift+S), right-click the style name and choose Modify from the context menu. In the Modify Style dialog box, click Format, Paragraph. Make sure that Line Spacing is what you want, and that Spacing Before and Spacing After are both set to zero. Click OK. To transfer the style definition to the attached template, d...

Multiple Report Dictionaries
We just acquired another company and some of the modified reports will need to be different than the ones we currently use. There are a few people that will need to work with both companies in Great Plains. Is there a way to change which reportws dictionary a company uses - or a user uses - without editing the launch file? Thanks,, Mike You could have two installations of the client on the workstation. Each installation would have a different dictionary file. The user would have to pick the right one. "MikeW" <MikeW@discussions.microsoft.com> wrote in message news:...

in Publisher I want to merge/send email with multiple attachments
Using Publisher 2007 I know how to do a merge and then email out from a list. Publisher gives the option to attach multiple attachments to the email but when the send actually goes out it only carries the first of the attachments and discards the others. Is there a trick to making multiple attachments stay attached? or is this a bug... Thanks to anyone who can clear this up.. Rust Gilbert Rust, Since you already know how to do email merges in Publisher 2007, you're probably the ideal person to answer my question...I have been trying to do an email merge using an existing publis...

Can I embed or link multiple .pdf files into or to an excel file?
I would like to link .pdf files to an excel file. Within my excel file I would like to have a column that has file names in it. Then have excel link those files to the excel file so when I print the excel file all the linked files print along with it. use hyper link "GrubbyG" wrote: > I would like to link .pdf files to an excel file. Within my excel file I > would like to have a column that has file names in it. Then have excel link > those files to the excel file so when I print the excel file all the linked > files print along with it. ...

Sending multiple Emails so each person does not get the list
We want to send out multiple emails to several email accounts. We dont want the accounts to see the list of accounts that the email went to. How does one do this in Outlook? In any contacts folder, Tools | Mail Merge is the best choice. --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx =20 "tom" <Spamblocker@ameritech.net> wrote in message = ...

Outlook 2003
Hi, Anyone know if it is possible to save multiple calendar selection views in Outlook 2003 yet ? For example a receptionist may have the ability to view say twenty or so users calendars. When she closes Outlook and opens it up again she has to select them all over again. I see lots of people wanting to do this and being told that it's not possible...or at least the posts I've read thus far. Jim. ...

Supporting multiple excel versions from .NET
Hi, I am using excel automation to write data to Excel. I am using Excel 9 and I using early binding to create the objects. I would like to support Excel versions 9 and upwards. To run the same application on a production system, with office XP,( which has only the framework installed), should I distribute the olb file, that I used while referencing, along with my installation? Are there any other dependencies, that I need to take care? Any help would be greatly appreciated. Thanks in advance. ...

Wrong sender name when forwarding meeting request....
Hello... need help. ! When I (user A) send a meeting request to user B and user B forwards the request to user C. User C will see me (User A) as sender. I thought it should be user B, because he forwards the request. Does anybody know this ?? Thanks Marc On Fri, 28 Jan 2005 03:25:03 -0800, "Marc" <Marc@discussions.microsoft.com> wrote: >Hello... need help. ! > >When I (user A) send a meeting request to user B and user B forwards the >request to user C. User C will see me (User A) as sender. I thought it should >be user B, because he forwards the request....

How do I remove multiple hyperlinks in the same cell (Excel)?
I have multiple hyperlinks in one Excel cell, each separated by a hard return (ALT-Enter). I can remove the hyperlinks using: -- right click > remove hyperlink -- or by using a macro but I cannot get this to work on multiple links in one cell. When I do this, all links go into one line separated by a square box. I have had to create a separate line for the second hyperlink, and this is making my spreadsheet look out of alignment. Please help! ...

Removal of 100's of spacing in numbers
I want to be able to use the replace command, but it won’t find the spaces for me. When I copy tables with numbers from various sources, I get spaces inside and after the numbers. E.g. “1 234 “ I know the use of SUBSTITUTE and other functions, but it is not an effective way of working when there are so many columns. I have tried to change the cell format to text, but still no luck in finding the spaces with the replace command. Might be some other character. Place your cursor between 1 and 2 and copy Select the columns with numbers Press Ctrl+H In the Find box press Ctrl+...

Multiple Outgoing Messages
Recently, Outlook 2002 (Internet Mail Only) clients on our LAN have begun to intermittently send outgoing messages repeatedly. In most, but not all, instances the messages have attachments, and take an unusually long time to send before showing a "Complete" Send/Receive status. The messages then remain in the Outbox, and are sent multiple times before finally clearing themselves or being manually deleted. Any insights into this would be greatly appreciated. Thanks, lewis. Hi, It seems like you've gotten a virus of some kind. There's no harm in running an an antivi...

multiple pick from drop-down list
Does anyone know how to setup a drop-down type (or other type) list where I could pick multiple selections from the list and have it populate each selection in a different cell? Thanks, John Drop-downs do not lend themselves to multiple selections (what should be shown in the text area when the drop-down is not dropped down? You would probably be best off using a ListBox (it supports multiple selections). Can you give a more detailed description of what you want to do? Rick "johnrb7865" <johnrb7865@discussions.microsoft.com> wrote in message news:DD85C389-6AFC-4BC1-9...