Join David Powers for an in-depth discussion in this video What you should know before watching this course, part of Learning PHP SimpleXML.
- This is an intermediate course, so you should already be proficient at writing PHP scripts. SimpleXML uses PHP built-in classes, so you need to be comfortable working with classes and objects. In addition to SimpleXML, I'll be using other built-in classes, such as DateTime and DateTimeZone. This is a course about reading and writing XML, or Extensible Markup Language, so I assume you're familiar with the basics of XML. Chapter three is devoted to using SimpleXML with XPath, which is an official specification for accessing data in XML.
So, knowledge of XPath would also be useful, but it's not essential. You can either skip that chapter, or watch it to see if it sparks an interest in learning more about XPath. Don't worry if these requirements sound beyond your current level. The lynda.com online training library has you covered. If you're just starting out with PHP, my Introducing PHP or PHP for Web Designers will get you up to speed with the basics. Jon Peck's course, Object-Oriented Programming with PHP, will give you a solid foundation in working with classes and objects.
For XML, you'll be in good hands with Joe Marini and his XML Essential Training. As for physical requirements, all you need is a web server running PHP 5.4 or later. Most of the code in this course will run on older versions of PHP 5, but I use a couple of techniques that require a minimum of 5.4. I recorded this course on Windows 8.1, but your operating system is irrelevant.
Linux, Windows, or Mac OS X, are all fine. Finally, to follow along with the examples, you need a script editor and browser. I'm using PHPStorm 8 and Chrome, but choose whichever ones suit you best.
- Loading an XML document
- Converting values to strings
- Handling errors
- Working with XML namespaces
- Using XPath
- Consuming an RSS feed with XML
- Adding and editing XML elements and attributes