Armenian Knowledge Base  

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

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

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>
<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>

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

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: 33
Posts: 4,007
Downloads: 0
Uploads: 0
Reputation: 0 | 0

А в чем собственно вопрос? Если есть DOM экстеншн то:
если нет то погрязней получается, но все же работает:

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

Thread Tools

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

All times are GMT. The time now is 20:28.

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