An example to parse a xml file

the xml file content:download

1. We need to parse the values which enclose in "username", "password", and "url" tags. And the three tags enclose in "application_server_setup"
2. We need to retireve the "name" attribute in "Form" tag
3. In each "Form" tag, it has some "Role" tags, we need to get the "name", and "sequence" atrribute in each "Role" tag

Sample code: ParseXML.java

No comments: