PHP XML/XSL Parsing and ProcessingMore than 730 titles from different sources. Prepared by gotAPI.com |
|
|
1 - 75 76 - 150 151 - 225 226 - 300 301 - 375 376 - 450 451 - 525 526 - 600 601 - 675 676 - 750 www.gotAPI.com |
Book Review: Pro PHP, XML and Web Services
Since its release in 2004, PHP 5 has evolved to become stable enough for serious consideration in use in a production environment. Along the way, PHP 5 has seen more than a handful of tweaks and changes, especially in its overhauled support for XML and XML web services. Now that it is a stable, it is fitting that there be a reference on all things PHP and XML. Enter Pro PHP XML and Web Services, which aims to be your single source of refer...
Building XML Trees With PHP
Need to manipulate XML document trees, but don t have the DOM extension compiled into your PHP build? Take a look at XMLTree, a PEAR class that allows you to create and manipulate XML document trees without requiring the PHP DOM extension. If you ve been following past issues of this column, you re probably already aware of the numerous things you can do with XML and PHP. You also probably already know the basics - that there are two ways XML can...
Converting XML Into A PHP Data Structure
In the last few years, XML has received great media attention, and most languages support the parsing and extraction of data from XML documents. Besides being a great three-letter anacronym to sprinkle on your resum, XML is actually a useful data storage structure for PHP programmers. Before you begin to use XML, you must first determine if your project really needs what XML offers. There are alternative data storage formats like fixed-w...
Data Exchange with XML, WDDX and PHP
Let me be completely frank with you.
DOM XML: An Alternative to Expat
There are many xml tutorials for php on the web, but few show how to parse xml using DOM. I would like to take this opportunity to show there is an alternative to the widespread SAX implementation for php programmers. DOM (Document Object Model) and SAX (Simple API for XML) have different philosophies on how to parse xml. The SAX engine is extremely event-driven. When it comes across a tag, it calls an appropriate function to handle it. This mak...
Dynamic XML Conversion Using The SAX Parser And A Stack
This article describes an alternative way of converting XML to HTML using the SAX parser. For each tag you want to convert, you write a conversion function. This function is called with two arguments: contents and attributes. The return value of the function will replace the tag and its contents in the finished document. Introduction We all know it: XML is great. (If you don t, look at some of the great articles at this site.) But why is it so c...
Dynamic XML with PHP
In this article I will show how to generate dynamic XML documents with Object-Oriented PHP. Before I get started, let s get right to the heart of this functionality. Although the code may look fancy, being packaged up inside objects and inheritance, the key elements of this functionality rest in the the mysql_list_fields() and mysql_num_fields() functions. What they do is get a field list array and a column count for a given table in a database. ...
How to import Excel, Access or XML Data Into a MySQL DB
We very often need to import data into MySQL databases. This becomes a tough job if we don t have a reliable and easy-to-use MySQL GUI. At times, when I am working on deadlines, this job becomes frustrating and I find myself wishing I had a tool to do this job for me. I recently found Navicat, which can convert Excel spreadsheets and MS Access to MySQL databases, eliminating time-consuming data entry and the errors that may accompany it. The tool...
How to Import Excel, Access or XML Data into MySQL Using Navicat
by kenlin This article discusses a solution to import MS Excel, MS Access, XML data to local or Remote MySQL databases by using a famous MySQL Admin Tool called Navicat. You can find the information of Navicat at http://www.mysqlstudio.com/detail.php3. Overview We very often need to import various data into MySQL databases. This becomes a tough job if we don t have a reliable easy-to-use MySQL GUI; At times, when I am working on deadlines, this...
Introducing SimpleXML in PHP 5
In the first article of a three-part series, you will learn the basics of using the simplexml extension that comes with PHP 5. This library is primarily focused on parsing simple XML files, and can save you a lot of work.
Loading XML Strings with simpleXML in PHP 5
Are you looking forward to learning about loading XML data strings, as well as searching and accessing nodes? Then this is the tutorial you ve been waiting for since last week! Welcome to the second part of the series Working with simpleXML in PHP 5. This three-part series introduces the most important features of the simpleXML extension that comes with PHP 5, and shows by several hands-on examples how to implement the handy set of XML-parsin...
PHP and XML: using expat functions
The Extensible Markup Language is definitely something that most developers will want to add to their toolbox. XML is a W3C standard that is open, language neutral, API-neutral, streamable, textual, human-readable and is a way of bringing structured data to the web. XML is a subset of SGML and is not a markup language in itself but allows the author to define their own markup language where it is best suited for representing hierachical data. No...
Searching and Replacing Nodes with SimpleXML in PHP 5
Want to learn how to get the most out of the simpleXML extension that comes bundled with PHP 5? Welcome to the last part of the series Working with simpleXML in PHP 5. In three tutorials, this series covers topics ranging from the basics of parsing XML files with this library, to performing advanced tasks, such as searching, extracting and replacing nodes, and interoperating with the XML DOM.
Serializing XML With PHP
Simplify the task of creating XML documents with the XML_Serializer class, which lets you build nested XML documents from PHP data structures like arrays and objects (and vice versa). I ll show you how to build an XML document tree via the XML_Serializer class from PEAR, how to programmatically create an XML document from an array or an object, how to attach attributes to elements, and how to customize the behavior of the serializer. All this, an...
Transforming XML with XSL using Sablotron
In my last article I covered the use of the expat functions available to PHP for parsing XML documents using the SAX method. The sample code was a class that read the XML document and generated the HTML to present the data in a nice table. This example was far from perfect due to the fact that the presentation of the data was not separate from the class code that had to parse the XML document. This meant that a slight modification to the HTML ge...
Using PHP 5 s SimpleXML
XML is great, but I ve constantly wondered why it s so difficult to parse. Most languages provide you with three options: SAX, DOM, and XSLT. Each has its own problems: // ); //]] SAX s event-based design forces you to track elements manually, by pushing and popping them on and off of a stack. DOM is bulky and cumbersome. While comprehensive, it takes seven lines just to read hello. XSLT? If I wanted to program in a functional language,...
Using PHP and XML with Apache Cocoon
First off, for those of you who don t know what Cocoon is, check out http://xml.apache.org where you can download the source and read up on it. In short Cocoon is a suite of Java Servlets that sit on your server waiting for .xml pages and then - if applicable - it applies the relevant XSL transformations. With one XML page and different XSL pages you can deliver rendered output suitable for your Browser, for example HTML for your Desktop or WML ...
Using XML, Part 5: SOAP and WSDL
In the previous article in this series I demonstrated how XML is used to make remote procedure calls with XML-RPC in PHP. This article will focus on SOAP and WSDL (both of which use XML as their underlaying method of describing data) and demonstrate how a PHP script can act as a SOAP client and auto-magically discover detailed information about a web service. An overview of Soap SOAP, originally an acronym for Simple Object Access Protocol, is a ...
Using XML: A PHP Developer s Primer
This series of articles will focus on XML, its applications in modern day web development and how PHP fits into this niche. In this article, we will focus specifically on the tools provided to us by PHP which enable us to manipulate XML data sources. What is XML and Why Use it? XML (eXtensible Markup Language) is a W3C standard designed to allow the easy exchange, storage and use of data between web applications and services. Data encoded using t...
Using XML: A PHP Developer s Primer, Part 2
In the first part of this series, we took a look at how PHP 5 can be used to manipulate and parse XML files. In this installment, we are going to focus on Ajax, one of the most useful and topical applications of XML. Initially, we are going to introduce Ajax and learn how to use the XMLHTTP object provided by most modern web browsers to create a live email validation form. Then we will pick up where we left off with the theme of XML and introduce...
Using XML: A PHP Developer s Primer, Part 3
In our last article, we touched the surface of Ajax by developing a simple email validation application. In this article we are going to delve deeper into Ajax and explore how XSL can be used on both the client side (using Javascript) and on the server (using PHP) to transform XML data into XHTML. eXtensible Stylesheet Language (XSL) XSL is an application of XML that is used to describe the presentation of XML through the use of stylesheets. It i...
Using XML: A PHP Developer s Primer, Part 4: XML-RPC, PHP and Javascript
This is the second half of an article that began last week. If you haven t read the first part, please do so before reading on... Creating the PHP Server The PHP RPC server uses the XML_RPC_Server object provided by the PEAR XML-RPC package. Both this and the EmailValidator object will be required in the server: require_once email_validator.php ; require_once XML/RPC/Server.php ; PHP fun...
Using XML: A PHP Developer s Primer, Part 4: XML-RPC, PHP and Javascript
In this article we will demonstrate how PHP can be used to call upon web services provided by third part sites via an XML-RPC server. We will also show you how to create your own XML-RPC and use client-side Javascript to invoke procedures in your PHP scripts. What is RPC? RPC is an acronym for Remote Procedure Call. As the name suggests, RPC is a technology that provides an interface for making procedure calls over a network. Remote procedure cal...
Using XML - Part 6: Validation
This series has so far focused on XML technologies and how they can be utilised using PHP 5. A subject we have not touched upon yet, is XML validation. This article will explore the application independent XML validation standards of DTD s, the XML Schema Language and the XSLT-based Schematron language. I will demonstrate how to validate XML in PHP and demonstrate how PHP 5 s XSL extension can be used to validate XML using the Schematron language...
XML and PHP. Part 1: Using The WDDX Functions
I ve had text lying around from when we were writing the book (1) last year, and the people at Wrox gave they OK for the information to be put as articles in PHPBuilder.com, so here it is the first one of a series. Introduction The Extensible Markup Language (XML), is a metalanguage that allows the definition of markup languages. It is not a markup language in itself, but you can think of it as providing the construction rules for specialized la...
XML How-To
Recently, at work I was given the job of learning XML. OK, so it wasn t technically XML, it was RDF, but I found that PHP s XML parsing functions worked just the same. At work I parsed out DMOZ (http://www.dmoz.org) but for simplicity I will stick with the basics of XML and then leave you free to parse DMOZ in your extra time ;o) To begin with you will want to make sure that you have a PHP binary compiled with the --with-xml option enabled. On...
|