XML
  Home arrow XML arrow Using PHP with XML (part 1)
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Using PHP with XML (part 1)
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 18
    2001-06-18

    Table of Contents:
  • Using PHP with XML (part 1)
  • Getting Down To Business
  • Let's Talk About SAX
  • Breaking It Down
  • Call Me Back
  • What's For Dinner?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    Using PHP with XML (part 1)
    (Page 1 of 6 )

    By separating content from presentation, XML offers Web developers a powerful alternative to traditional HTML technology...and when you combine that with PHP, you have a truly compelling new set of tools. In this article, find out how PHP's SAX parser can be used to parse XML data and generate HTML Web pages. You've probably already heard about XML, Extensible Markup Language - it's been the subject of many water-cooler conversations over the past year and a half. You may even have seen an XML document in action, complete with user-defined tags and markup, and you've probably heard about the Holy Grail of the XML effort - using a single marked-up XML data source to generate complex documents in HTML, WML or other formats.

    The strange thing about XML, though, is that it's very hard to figure out where to start. It doesn't take long to figure out the basics of creating an XML file, or the rules for XML markup. However, that's where most novice developers hit a brick wall; XML documentation often fails to clearly explain the logical next step, preferring instead to focus on the technical aspects of the language itself. The situation can be frustrating - imagine an automobile manual filled with technical details on the types of nuts and bolts used, rather than driver instructions and cautions - and the excessive jargon only adds to the overall confusion.

    Over the next few pages, I will be attempting to rectify this a little bit, with an explanation of how you can use PHP to read your XML data and convert it into browser-readable HTML. I'll also spend some time explaining the different methods of parsing XML data, and the PHP implementation of each of these, together with a brief note on how all the pieces fit together.

    I'll try and keep it simple - I'm going to use very simple XML sources, so you don't have to worry about namespaces, DTDs and PIs - although I will assume that you know the basic rules of XML markup, and of PHP scripting. And, of course, I'll assume that you have a sense of humour and will laugh at the appropriate places.

    More XML Articles
    More By icarus, (c) Melonfire


     

       

    XML ARTICLES

    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...
    - SimpleXML
    - XForms Basics, Part 3
    - XForms Basics, Part 2
    - XForms Basics




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway