You are here: xml « PHP « IT news, forums, messages
xml

Posted by Andy Pieters on 05/27/05 16:16

Hi all

I recently decided to switch to xml for the configuration of our programs.

I am now looking for a good way to handle that xml data.

Basically, what I am looking for is a functionality where I say

Get tag x with attribute1=y, attribute2=z,..., read its contents and put it in
an associative array.

It should put it in an array like this:

output[0]['tagname']=...
output[0]['arg1']=...
output[0]['arg2']=...
etc


Example

<xml>
<someheader name="x">
<content attrib1="y" attrib2="z" />
<content attrib1="x" />
</someheader
</xml>

getxmldata("someheader","name","x")

would result in
data[0]['type']=content
data[0]['attrib1']=y
data[0]['attrib2']=z
data[1]['type']=content
data[1]['attrib1']=x


Anybody got any ideas?


With kind regards



Andy

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация