473,508 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XmlWriter localization

Hi all,

i have to generate a xml file from a product table using the XmlWriter
Class.
I want to put out de product name for different languages, countries.
The recipient of the generatet xml file espects something like that:

<name xml:lang="en-US">product name</name>
<name xml:lang="de-DE">Produktname</name>

I have no idea how to realize this:(
I hope someone can help me with this issue.

Thanks
Sep 28 '07 #1
2 2264
Hi Peter,

Hmm... did you mean this:

Writer.WriteStartElement("name");
Writer.WriteAttributeString("xml", "lang", string.Empty, "en-En");
Writer.WriteString("product name");
Writer.WriteEndElement();

Regards, Alex
[TechBlog] http://devkids.blogspot.com
Hi all,

i have to generate a xml file from a product table using the XmlWriter
Class.
I want to put out de product name for different languages, countries.
The recipient of the generatet xml file espects something like that:
<name xml:lang="en-US">product name</name>
<name xml:lang="de-DE">Produktname</name>
I have no idea how to realize this:(

I hope someone can help me with this issue.

Thanks

Sep 29 '07 #2
>
Hmm... did you mean this:

Writer.WriteStartElement("name");
Writer.WriteAttributeString("xml", "lang", string.Empty, "en-En");
Writer.WriteString("product name");
Writer.WriteEndElement();
yes, thank you!

now i have the next problem:
i have to generate this:
<custom-attribute xml:lang="de-DE" dt:dt="string"
name="displayName">Farbe</custom-attribute>

but what i get ist this:
<custom-attribute xml:lang="de-DE" dt="string"
name="displayName">Farbe</custom-attribute>

using: writer.WriteAttributeString("dt", "dt", String.Empty, "string")

any idea?

thanks in advance, Peter
Sep 30 '07 #3

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

Similar topics

3
8023
by: Michael Malinak | last post by:
Since XmlWriter offers so many nice options for formatting, I thought it would be nice to read in via XmlReader, and write back out via XmlWriter. It might be overkill, but I'd also like to be able...
6
1973
by: Rental | last post by:
I'm having the sam problem as described below with the Localization toolkit. Does anyone know if there is a solution to this problem. --->When attempting to generate resource dlls with...
1
2994
by: jschell | last post by:
The following two cases behave differently in Net 2.0. The Case_Create_StringWriter throws an exception while the Case_XmlTextWriter does not. Is there a problem with this code? Or is this a...
5
2638
by: CMM | last post by:
I don't seem to "get" ASP.NET 2.0's Localization features. I've read up on everything... and of course, everything is explained in cursory softball terms- not any "real-world" usage way. I hope...
2
2270
by: Harry | last post by:
Hi, I am using XMLWriter to build xml and I need to build the element below. How do I do this? <Password format="encrypted">password</Password> Thanks
0
3589
by: Janusz Nykiel | last post by:
I've stumbled upon unexpected behavior of the .NET 2.0 System.Xml.XmlWriter class when using it to write data to a binary stream (System.IO.Stream). If the amount of data is less than a certain...
1
2934
by: MAF | last post by:
Is there a simple way to get the text, xml, from an xmlwriter. I have a XML writer that writes to a file, and I want another function to return the text that the xml writer is produced. Any...
2
19151
by: darrel | last post by:
I want to make my XML as such: <parentItem> <childItem attribute="myAttribute">myContent</childItem> </parentItem> I thought I could just do this: ...
9
6073
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a .net application and am using the xml writer class to create an xml file that opens as an excel file. I am trying to write out the following but am having difficulty. <Row> <Cell...
0
7115
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...
1
7036
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...
0
5624
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,...
0
4705
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
3191
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
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
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 ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
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...

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.