XmlWriter localization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Ramsebner

    #1

    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


  • Alex Meleta

    #2
    Re: XmlWriter localization

    Hi Peter,

    Hmm... did you mean this:

    Writer.WriteSta rtElement("name ");
    Writer.WriteAtt ributeString("x ml", "lang", string.Empty, "en-En");
    Writer.WriteStr ing("product name");
    Writer.WriteEnd Element();

    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
    >

    Comment

    • Peter Ramsebner

      #3
      Re: XmlWriter localization

      >
      Hmm... did you mean this:
      >
      Writer.WriteSta rtElement("name ");
      Writer.WriteAtt ributeString("x ml", "lang", string.Empty, "en-En");
      Writer.WriteStr ing("product name");
      Writer.WriteEnd Element();
      >
      yes, thank you!

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

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

      using: writer.WriteAtt ributeString("d t", "dt", String.Empty, "string")

      any idea?

      thanks in advance, Peter


      Comment

      Working...