I have an XML file filled with 'producers.'
Here is a sample of what the file looks like:
<producer>
<name>John Doe's Fish Emporium!</name>
<owner>John Doe</owner>
<address>
<civic>123</civic>
<mailing>Example Drive</mailing>
<town>Halifax</town>
<province>Nova Scotia</province>
<postal>A1B 2C3</postal>
<phone>902-123-4567</phone>
<fax>902-098-7654</fax>
<email>john@example.com</email>
<website>www.example.com</website>
</address>
<products>
<product>Pollock (Saithe)</product>
<product>Flounder/Sole</product>
<product>Salmon, Farm Raised</product>
<product>Mussels, Blue</product>
</products>
<exports>
<region>Europe</region>
<region>North America</region>
<region>Pacific Rim</region>
<region>United States</region>
</exports>
</producer>
The user will enter a value into an html form, which will search the XML document for that keyword, then print out the entire producer. So for example if the user searches for the product Salmon, the search will spit out the entire producer above. How do I go about detecting where I am in the XML document, then echoing out the entire producer?
Thanks!