how to read a value from a xml document based on the user input
how 开发者_运维知识库to read a value from a xml document based on the user input ( for example if user enter id value then all the related values display from xml document)
The question is somewhat vague, but the same things that apply to handling user input in general apply here too. You'd probably proceed something like this:
- Read user input
- Read XML file
- Parse XML into an XML Document object
- Decide, based on user input, which part of the document to display
- Extract the desired part from the document (either by manually walking the document tree, or using XPath)
- Display the extracted part
精彩评论