I am working with PHP5 and have a requirement to select xml node on the base of parameter. My xml contains the list of country and it has child node of state list. Like this
<?xml version="1.0" encoding="utf-8"?> <country_list> <country id="US"> <state>NY</state> <state>CA</state> <state>NJ</state> </country> <country id="AU"> <state>New South Wales</state> <state>Victoria</state> <state>Queensland</state> </country> </country_list>
I want to get the xml like
<country id="AU"> <state>New South Wales</state> <state>Victoria</state> <state>Queensland</state> </country>
Can anyone help me how can I achieve this?
thanks in advance.


Sign In
Create Account

Back to top









