Click here to Skip to main content
15,905,913 members
Home / Discussions / C#
   

C#

 
GeneralRe: Factory Pattern Question With Generics Pin
nlecren20-Nov-05 14:27
nlecren20-Nov-05 14:27 
GeneralRe: Factory Pattern Question With Generics Pin
S. Senthil Kumar20-Nov-05 19:27
S. Senthil Kumar20-Nov-05 19:27 
QuestionHow to playback file wave by tapi Pin
sharapova20-Nov-05 3:13
sharapova20-Nov-05 3:13 
AnswerRe: How to playback file wave by tapi Pin
Ray Cassick20-Nov-05 8:25
Ray Cassick20-Nov-05 8:25 
QuestionRe: How to playback file wave by tapi Pin
sharapova22-Nov-05 4:26
sharapova22-Nov-05 4:26 
QuestionHow do i get a list of Currently running tasks? Pin
Anthony Mushrow20-Nov-05 3:08
professionalAnthony Mushrow20-Nov-05 3:08 
QuestionXmlTextReader - Enumerating Nodes Pin
matthias s.20-Nov-05 3:06
matthias s.20-Nov-05 3:06 
AnswerRe: XmlTextReader - Enumerating Nodes Pin
Rob Philpott20-Nov-05 10:00
Rob Philpott20-Nov-05 10:00 
Hiya,

XmlTextReader provides a forward-only way of parsing xml documents. This means you don't have random access ability and the means to jump around your xml document. You start at the top and work your way to the end.

With this in mind, if you want a 'fallback' language in your example, you either need to provide this as the last entry in the xml, or else implement a way of parsing which remembers the 'best yet' record from the xml.

Two points about your xml, firstly probably just a typo but the </image> tag doesn't match <img> tag, and secondly you are using the language as the element name <en-US> - this might be better represented as <language name=en-US>.

You can use XmlTextReader.Read() to fetch the next element from the document. Check its NodeType property to determine if it is Element. Then using your xml as it stands you can use the Name property to pick up the element name. From there you can have a boolean flag which you set to tell you're in the right language and can read the title and description.

Hope that makes some sense...


Regards,
Rob Philpott.
GeneralRe: XmlTextReader - Enumerating Nodes Pin
matthias s.20-Nov-05 21:39
matthias s.20-Nov-05 21:39 
QuestionBackGroundImage of MDIForm in C#.Net Pin
Harshalbhakta20-Nov-05 2:13
Harshalbhakta20-Nov-05 2:13 
AnswerRe: BackGroundImage of MDIForm in C#.Net Pin
newpant20-Nov-05 4:15
newpant20-Nov-05 4:15 
GeneralRe: BackGroundImage of MDIForm in C#.Net Pin
Harshalbhakta21-Nov-05 14:28
Harshalbhakta21-Nov-05 14:28 
GeneralRe: BackGroundImage of MDIForm in C#.Net Pin
newpant22-Nov-05 1:31
newpant22-Nov-05 1:31 
Questiondisplay chronometer connected to parrallel port Pin
el_aristo20-Nov-05 2:11
el_aristo20-Nov-05 2:11 
Questionhow to use button to open the new form Pin
activesync20-Nov-05 2:05
activesync20-Nov-05 2:05 
AnswerRe: how to use button to open the new form Pin
Jeff Bramwell20-Nov-05 2:36
Jeff Bramwell20-Nov-05 2:36 
Questionparallel port display chronometer Pin
el_aristo20-Nov-05 1:48
el_aristo20-Nov-05 1:48 
QuestionPopulating datagrid from csv stream Pin
rana7420-Nov-05 0:08
rana7420-Nov-05 0:08 
AnswerRe: Populating datagrid from csv stream Pin
Curtis Schlak.20-Nov-05 15:29
Curtis Schlak.20-Nov-05 15:29 
Questiontreeview Pin
F.Hashemi19-Nov-05 23:55
F.Hashemi19-Nov-05 23:55 
AnswerRe: treeview Pin
Jeff Bramwell20-Nov-05 2:39
Jeff Bramwell20-Nov-05 2:39 
AnswerRe: treeview Pin
Curtis Schlak.20-Nov-05 6:35
Curtis Schlak.20-Nov-05 6:35 
QuestionDataGrid &amp; DataRelation Pin
RoyRose7819-Nov-05 20:10
RoyRose7819-Nov-05 20:10 
Questionstrongly typed collections over web services Pin
(Steven Hicks)n+119-Nov-05 18:37
(Steven Hicks)n+119-Nov-05 18:37 
QuestionREGEX Expressions Pin
Expert Coming19-Nov-05 17:09
Expert Coming19-Nov-05 17:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.