Hi there. I'm sor of beginner in c# and want to compare the value of the elements form a XML file with other values wich i declare for example. My XML file looks like this:
<alarma>
<conditii>
<conditie>
<semnal>Umiditate</semnal>
<operator_semnal>=</operator_semnal>
<valoare>90</valoare>
</conditie>
<operator>&</operator>
<conditie>
<semnal>Temperatura</semnal>
<operator_semnal><</operator_semnal>
<valoare>37</valoare>
</conditie>
</conditii>
</alarma>
I want to compare the values from the nodes with other value that i declare and show a message depending on the result. Can anyone help me?
undead25
0
Newbie Poster
Recommended Answers
Jump to PostRead this http://www.developer.com/net/csharp/article.php/3489611 (many more on Google)
Jump to PostI was suggested by Mr. serkan to post code. Here is a sample which helps undead25 to solve his/her problem.
Xml file - sample.xml
<?xml version="1.0" encoding="utf-8" ?> <alarma> <conditii> <conditie> <semnal>Umiditate</semnal> <operator_semnal>=</operator_semnal> <valoare>90</valoare> </conditie> <operator>&</operator> <conditie> <semnal>Temperatura</semnal> <operator_semnal></operator_semnal> <valoare>37</valoare> </conditie> </conditii> </alarma>
Place this code …
All 7 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
kvprajapati
1,826
Posting Genius
Team Colleague
serkan sendur
commented:
why dont you provide some code
-1
undead25
0
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
undead25
0
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
undead25
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.