calling certain elements from an XML file?



Kind of new to XML but, I'm working with an XML file listed below.


is there a way I can just pull certain info from each company?


for ex. I just want the info from the industry element to be shown



<companies>
<company name="1" imageurl="logo">
<certification> Certified Best Employer </certification>
<employee> 5,0000 </employee>
<industry> Risk Services </industry>
<html_url> http://www.google.com </html_url>
</company>

<company name="2" imageurl="logo">
<certification> Certified Best Employer </certification>
<employee> 5,0000 </employee>
<industry> Risk Services </industry>
<html_url> http://www.google.com </html_url>
</company>

<company name="3" imageurl="logo">
<certification> Certified Best Employer </certification>
<employee> 5,0000 </employee>
<industry> Risk Services </industry>
<html_url> http://www.google.com </html_url>
</company>
</companies>

No comments:

Post a Comment