Click here to Skip to main content
15,891,762 members
Home / Discussions / C#
   

C#

 
GeneralRe: Checking folder read write access C# Pin
Kelvin Armstrong18-Oct-09 7:00
Kelvin Armstrong18-Oct-09 7:00 
AnswerRe: Checking folder read write access C# Pin
User-Rock25-Nov-09 19:13
User-Rock25-Nov-09 19:13 
GeneralRe: Checking folder read write access C# Pin
Liu Junfeng15-Mar-11 0:19
Liu Junfeng15-Mar-11 0:19 
QuestionDiscovering location of csc.exe through code Pin
krafix10-Nov-08 13:24
krafix10-Nov-08 13:24 
AnswerRe: Discovering location of csc.exe through code Pin
netJP12L10-Nov-08 14:40
netJP12L10-Nov-08 14:40 
AnswerRe: Discovering location of csc.exe through code Pin
Ravi Bhavnani10-Nov-08 16:41
professionalRavi Bhavnani10-Nov-08 16:41 
GeneralRe: Discovering location of csc.exe through code Pin
Alan Balkany11-Nov-08 3:36
Alan Balkany11-Nov-08 3:36 
QuestionHow do I find a XML element based on attribute Pin
Ola E10-Nov-08 11:02
Ola E10-Nov-08 11:02 
I'm new to XML, but wat I'm trying to do is this.
I have a XML file with config settings and language items
e.g.
<XML>
<Config>
<Port>com1</Port>
<Baud>9600</Baud>
</Config>
<Language>
<Item No="1000" Text="Hello world" />
<Item No="2000" Text="Good Bye" />
</Language>
</XML>

I read the Config elements by using GetElementByTagName, so this is no problem.
I'm looking for a simmular way of selecting the language items so I can do somthing like
psedu code
Lang = XMLSetup.GetElementsByTagName("Language")[0];
XmlElement LangText= (XmlElement)Setup;
textbox.text=LangText.GetElementByAttribute("No","1000").GetAttribute("Text")

The last line selects the "value on an attribute, depending on an other attribute"
Could this be done?

If I change the structure of of my XML file to somthing like...
...
<Language>
<Item No="1000">
<Text>Hello world</Text>
</Item>

could it be done then??

Any ideas on how to format the XML and do the selection?

I'm used to work with databases, and XML could be used as a databse, or???
If you use an SQL table, you can simply do "select Text from Language where No="1000"...


Thanksfull for any adviceConfused | :confused:
AnswerRe: How do I find a XML element based on attribute Pin
Pete O'Hanlon10-Nov-08 11:07
mvePete O'Hanlon10-Nov-08 11:07 
GeneralRe: How do I find a XML element based on attribute Pin
Ola E10-Nov-08 19:03
Ola E10-Nov-08 19:03 
GeneralRe: How do I find a XML element based on attribute Pin
Tuwing.Sabado10-Nov-08 21:13
Tuwing.Sabado10-Nov-08 21:13 
QuestionProblem Pin
netJP12L10-Nov-08 9:57
netJP12L10-Nov-08 9:57 
AnswerRe: Problem Pin
Pedram Behroozi10-Nov-08 10:13
Pedram Behroozi10-Nov-08 10:13 
GeneralRe: Problem Pin
netJP12L10-Nov-08 10:22
netJP12L10-Nov-08 10:22 
QuestionCAB Single Instance App Pin
Brian Jenkins10-Nov-08 9:48
Brian Jenkins10-Nov-08 9:48 
QuestionWindows Forms vs DirectX Pin
Generico30010-Nov-08 7:38
Generico30010-Nov-08 7:38 
AnswerRe: Windows Forms vs DirectX Pin
Wendelius10-Nov-08 7:46
mentorWendelius10-Nov-08 7:46 
AnswerRe: Windows Forms vs DirectX Pin
Mark Salsbery10-Nov-08 8:25
Mark Salsbery10-Nov-08 8:25 
GeneralRe: Windows Forms vs DirectX Pin
Mark Churchill10-Nov-08 15:59
Mark Churchill10-Nov-08 15:59 
GeneralRe: Windows Forms vs DirectX Pin
Mark Salsbery10-Nov-08 16:04
Mark Salsbery10-Nov-08 16:04 
QuestionTrying to prevent the DataGridView Default Error Dialog Pin
Edward Hoad10-Nov-08 6:13
Edward Hoad10-Nov-08 6:13 
AnswerRe: Trying to prevent the DataGridView Default Error Dialog Pin
paas10-Nov-08 7:40
paas10-Nov-08 7:40 
QuestionUnified Session Variable Pin
k66610-Nov-08 5:56
k66610-Nov-08 5:56 
AnswerRe: Unified Session Variable Pin
Ennis Ray Lynch, Jr.10-Nov-08 7:11
Ennis Ray Lynch, Jr.10-Nov-08 7:11 
GeneralAnd Pin
Ennis Ray Lynch, Jr.10-Nov-08 7:13
Ennis Ray Lynch, Jr.10-Nov-08 7:13 

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.