Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / September 2007

Tip: Looking for answers? Try searching our database.

XmlWriter localization

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Ramsebner - 28 Sep 2007 21:53 GMT
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
Alex Meleta - 29 Sep 2007 09:32 GMT
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,
>
[quoted text clipped - 9 lines]
>
> Thanks
Peter Ramsebner - 30 Sep 2007 22:22 GMT
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.