Nikolai Onken <in**@nikolaionken.com> wrote:
Hey List,
I was wondering how I can get all Attributes of a XML-Tag without
knowing them. The XML could look like following:
<plugin>
<args level="1" depth="2"/>
</plugin>
<plugin>
<args permission="23"/>
</plugin>
Now both plugins use different Attributes in the args tags and the
program doesn't know them. Is there a way to get them? Put them into
an array? I am using PHP5
Thanks a lot and best regards,
Nikolai Onken
Since the XML-document should follow a specific DTD, you should know
*every* possible attribute. If you are just beginning to create such a
structure, maybe you can change it to something like:
<plugin>
<arg name="level" value="1" />
<arg name="depth" value="2" />
</plugin>
<plugin>
<arg name="permission" value="23" />
</plugin>
--
Simon Stienen <http://dangerouscat.net> <http://slashlife.de>
»What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done.«
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle