Jump to content


PHP XML parsing?

  • Please log in to reply
1 reply to this topic

#1 joeyjgarcia

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 19 June 2006 - 02:55 AM

I must be missing something but I've been looking at PHP XML tutorials and manuals for hours and I just don't see how they get the data from between the tags. Every tutorial shows how to capture the tag name and the attribute values but none are showing how to capture the data between tags, e.g., <customer>John Doe</customer>; how do I get to "John Doe"?

#2 Kris

  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 19 June 2006 - 10:39 AM

When parsing XML, I personally have used the xml_parse_into_struct() function. Look it up in the manual, there are a couple of examples of how you can use it.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users