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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chillyroll
Forum Newbie
Posts: 2
Joined: Wed Nov 29, 2006 10:42 pm

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

Post 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]
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

Im pretty sure that is done with the xml parser extension. http://us3.php.net/xml
Post Reply