Home arrow XML arrow Using PHP with XML (part 1)

Using PHP with XML (part 1)

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.

TABLE OF CONTENTS:
  1. Using PHP with XML (part 1)
  2. Getting Down To Business
  3. Let's Talk About SAX
  4. Breaking It Down
  5. Call Me Back
  6. What's For Dinner?
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 25
June 18, 2001

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

XML ARTICLES

- Google Docs and Xpath Data Functions
- Flex Array Collection Sort and Filtering
- The Flex Tree Control
- Flex List Controls
- Working with Flex and Datagrids
- 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...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: