Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

Query on XML document

 
webmaster forum
Activity
0%
 
New Poster
Posts: 11
Topics: 8
June 20, 2009, 02:00:32 AM

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

<?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>
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
June 29, 2009, 08:23:48 AM

The manual on this page will answer your question www.php.net

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
Activity
0%
 
New Coder
Gender: Male
Posts: 39
Topics: 0
WWW
August 15, 2009, 07:07:28 PM

I would more specifically recommend using SimpleXML for this. Read up in the manual section on that; it'll be the easiest to use for this.

Phantasy Star: Fringes of Algo | Castle Nintendo - Discussion Community
 
webmaster forum
Activity
0%
 
New Poster
Posts: 11
Topics: 8
November 02, 2009, 05:58:59 AM

thanks
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page February 01, 2012, 05:14:42 AM