attributes
Results 1 to 2 of 2

Thread: attributes

  1. #1
    Senior Member
    Join Date
    Apr 2005
    Posts
    1,241

    attributes

    is there a way to display the name of all the attributes within a xml file's node? just the names not the values?

  2. #2
    NMaOtBG bpat1434's Avatar
    Join Date
    Oct 2004
    Location
    Around 255.255.255.0
    Posts
    7,849
    Assuming you're using SimpleXML you could use SimpleXMLElement::attributes() to get the attributes and simply run array_keys to extract the attribute names.

    If you're using DOM you could look at the DOMElement::$attributes property and iterate over it looking at the $name property of each item.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •