View Single Post
Old 2004-11-09, 11:19   #3 (permalink)
McMorning
Portal User
 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Hi Schrauber,

i never programmed in C# or worked with XML files, so i don't know who helpful my suggestions would be, but give me a try.

First i don't know how you generate the XML file with the actual weather data. If this will be generated by you it would be quite simple, but if you get the whole file in this format from weather.com you should try to alter the entries.
(Actually i don't have a file where i can copy from, so maybe my 'Code' would be fully correct, but it should clear out what i mean)
Code:
<Weather>
   <Date>04/11/09</Date>
</Weather>
should be break down to:
Code:
<Weather>
   <Date>
      <Year>04</Year>
      <Month>11</Month>
      <Day>09</Day>
   </Date>
</Weather>
Also those things should be done with alle words which will be in the XML file (like the AM Averses proplem showed by epoch1970).
In that case you'll get a property for every word in the Weather statement. At second you'll need a 'Translation' XML file which should something like this:
Code:
<Translation>
   <German>
      <Dictionary>
         <Fog>Nebel</Fog>
         <Sunny>Heiter</Sunny>
         <Rain>Regen</Rain>
         ... or if words to difficult :)...
         <1>Bewölkt</1>
         <2>Glatteis</2>
         <3>Stürmisch</3>
      </Dictionary>
</Translation>
At last there would be a second section in this XML file (or a second XML file???) which holds the format for the whole phrase like this
Code:
   <German>
      <Format>
         <Date>Day.Month.Year</Date>
      </Format>
   </German>
Hopefully you understand what my intention was. The idea just tries to combine a word-by-word translation and a second section which tells you in which order the words have to be shown up. Also you would get a stable code and everyone out there can make a translation for his own language without your intervention.

Best regards,
McMorning
McMorning is offline   Reply With Quote