- Impact
- 0
Hi friends
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
I want to get the xml like
Can anyone help me how can I achieve this?
thanks in advance.
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
HTML:
<?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
HTML:
<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.







