Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
XML
matthew king
10y
771
1
Reply
Experts,
I am attempting to read the xml file below, but have become frustrated over the last 24-hrs with my inability to understand xpath and/or linq. Specifically, i'm attempting to abstract data based on user input. For example, if the user inputs"0024" into the "txtCarID" textbox and fires the click event, txtCarModel textbox would be populated with
Chevy Camaro and txtOrig textbox would be populated with United States.
Moreover, I need to populate the "cboxModel" combobox with all the Model ID associated with that particular car ID; so, if the user inputs "0024" into the "txtCarID" textbox, the "cboxModel" combobox would be populated with A01 and A03. Any help you could provide would be greatly appreciated as I'm trying to learn xml. Thank you!
Student
<?xml version="1.0"?>
<data>
<CAR id="0024">
<>Chevy Camaro</CarName>
<Country>United States</Country>
<State>Michigan</State>
<City>Detroit</City>
<model id="A01">
<doors>2</doors>
<eng>3.6</eng>
<mrsp>240000</mrsp>
</model>
<model id="A03">
<doors>2</doors>
<eng>5.7</eng>
<mrsp>31000</mrsp>
</model>
</CAR>
<CAR id="0028">
<>Chevy Cruz</CarName>
<Country>United States</Country>
<State>Michigan</State>
<City>Detroit</City>
<model id="A11">
<doors>4</doors>
<eng>1.8</eng>
<mrsp>19000</mrsp>
</model>
<model id="A13">
<doors>2</doors>
<eng>1.8T</eng>
<mrsp>21500</mrsp>
</model>
</CAR>
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
c# return value throug params keyword
export datagridview to xml