Page 1 of 1

Need Parser that can read attributes of XML document...

Posted: Wed Nov 29, 2006 10:48 pm
by chillyroll
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hello guys,
              I am looking for a parser in PHP that can return all the attributes of XML entities. I know how to read the XML Entities, but I have got a problem with reading attributes. So I will appreciate if you could give a parser that can return all the Entities and Attributes of respective entities as an array.

For e.g.:

[syntax="xml"]<?xml version="1.0" ?>
<Controller>
      <NumberOfBoards>5</NumberOfBoards>
      <NumberOfKeypads>1</NumberOfKeypads>
      <QueueMode>N</QueueMode>
      <EntranceDelay on="5" off="5" />
      <Limits minLength="36" maxLength="800" />
      <Conveyor perSecond="6.3" perPulse="8.0" />
      <Roller relay="1" needsOrder="1">
            <RollerUp1>84</RollerUp1>
            <RollerDown>84</RollerDown>
            <RollerUp2>84</RollerUp2>
       </Roller>
</Controller>
This is a part of my XML document. I want to return all the Entites with their attributes as an array.

Thanks in advance.


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Wed Nov 29, 2006 10:58 pm
by Zoxive
Im pretty sure that is done with the xml parser extension. http://us3.php.net/xml