Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 3 of 3

Thread: parsing XML

  1. #1

    parsing XML

    I have been looking around the internet for tutorials on how to parse information in an XML file and output it in a manner of my choosing and design. I found the two tutorials on this website titled XML Parsing using PHP {Easy} and the intermediate one as well.

    The tutorials were wonderful, however they lack something important that i need. They show how to use the information included between start and end tags, but not the information inside the tags themselves. I have little to no information in between tags, however almost all of my data is stored inside a tag itself with no accompanying end tag. Here is an example of one of the shorter tags in my file:

    <members memberCount="35">

    I'm sure by now you can understand what it is that I'm asking for and by the example you can see the sort of data needed to extract from the tag. Any help on this or even the URL of a tutorial that would help me with this would be very much appreciated.


    Thanks,
    Thomas

  2. #2
    icio's Avatar
    3,811
    posts
    looks better in lowercase
    I recommend that you use NEITHER of the tutorials that you talked about. Instead, look for some tutorials on using SimpleXML (http://php.net/simplexml).
    "60% of the time it works... every time." -- Paul Rudd as Brian Fantana.

  3. #3
    Quote Originally Posted by icio View Post
    I recommend that you use NEITHER of the tutorials that you talked about. Instead, look for some tutorials on using SimpleXML (http://php.net/simplexml).
    That works with me. I actually saw a quick sample of simpleXML on the internet while i was searching and I did not realize at the time that since PHP5 that it was not required to install. But things are well now. I actually used the SimpleXML tutorial from this site as my big helper though. It has all been an excellent help. And thank you for responding so quickly.


    Thomas

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
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012