Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 04.03.2005, 17:20   #1
Stalker
 
Timewind's Avatar
 
Join Date: 09 2002
Location: Припять
Age: 83
Posts: 853
Downloads: 0
Uploads: 0
Reputation: 12 | 3
Question XML parsing in PHP question.

situation:
file.xml - is the tree containing info like this:

<department name="Users" code="US">
<group name="New Band" code="NB" manager="Will Smith" id="4">
<person state="Singer" id="12">Sting</person>
<person state="Vocals" id="10">Peter Gabriel</person>
</group>
</department>
<department name="Others" code="OT">
<group name="Old Band" code="OB" manager="Jack Frost" id="21">
<person state="Bass" id="62">Deackon</person>
<person state="Drums" id="50">Taylor</person>
</group>
</department>

Using PHP I want to have/get
- state value for person with id 62
- group names in Others department
- person state and/or text in group named Old Band
etc.

thanx ahead.
__________________
... for long you live and high you fly ...
Reply With Quote
Old 05.03.2005, 11:01   #2
панаехавший
 
Obelix's Avatar
 
Join Date: 06 2003
Location: форпост
Age: 30
Posts: 4,007
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

А в чем собственно вопрос? Если есть DOM экстеншн то:
http://am.php.net/domxml
если нет то погрязней получается, но все же работает:
http://am.php.net/xml

а дом экстеншн кажись начиная с пхп5.0 уже билт ин.
Reply With Quote
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 02:50.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.