TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sachi vasishta
NA
252
0
How to read XML attribute values ?
Nov 21 2011 5:25 AM
Hi All,
How to read a XML attribute value in C# ?
I have a XML doc as below stored in a file called Auto.xml in the same path as that of the solution.
<root>
<fault category="pending">
<text>Pending Fault found on</text>
</fault>
<fault category="repaired">
<text>Repaired Fault on</text>
</fault>
<genere>
<text1>Aircraft</text1>
<text2>Component</text2>
<text3>Subsystem</text3>
</genere>
</root>
Now I want to check the node type, i.e., if the node type is attribute and if the attribute value is "pending" then I want to return the corresponding text node value "Pending Fault found on" as a string array. But I don't know how to read the attribute value of a node.
(I am using VS 2008)
Thanks,
Sachi
Reply
Answers (
7
)
How to upload two web site on same root directory
Can anyone say how to bind data in to repeater control