Transforms a (local|remote) XML file and its accompanying (local|remote) XSL file into html on the server using either a client output buffering in MSIE only or via a URL HTTP
GET include via the W3's XSLT public web service.
This function give the Transformation to Page ... According to files that are feed to it .. Feed one Standard XML and its XSL files it will generates according transformation
.... in Process of this it generates the Dyanamic XML files according data one want ...
This basic example will allow you to generate and XML file using PHP and data from your mySQL database. It also has the ability to save the XML Doc if you read through the
code and uncomment the three lines of code that do it.
Quick and dirty generic function to parse multiple SQL queries into a DOM XML structure. Based on use with a PostgreSQL db. This SQL2XML function is somewhat stronger then the
class-based one that can be found in the code gallery. Perhaps I'll extend / rewrite this function once the DOM XML functionality in PHP is stable.
This is a minimal, and hopefully simple class to get data out of a xml file via path query. Like; /rootNode/subnode/node .. if you don't understand read the code source,
you'll dig it :) It was inspired from lots of great codes from the open source (mainly from zend.com and pear.php.net), wich are not necessarly related to xml, list them back
would be too long and I would surely forget some, so i felt like I had to give it back to the open source. now make something better out of it :) to do: - add support for
duplicate nodes. - add support fo namespaces. note to coders: - the $i & $o stands for input & output, i think it's a clean and efficient way to handle mainstream data
trough functions. - this code may not be appropriate for proffessional use since it does not meet the industry standards and is still in beta developement - I think it can
handle malformed or broken xml files without ending with infinites loops or crashing, but you shall respect some rules to in your xml file composition .. and avoid node
repetition :/ i'll work on that soon. ** BOF file.xml ** data data ** EOF file.xml ** finally, feel free to report me bugs, suggestions or comments. - h3 at mindkind dot org
Parsing XML files in PHP is complex. But, like most things, it's not that hard once you get the hang of it. I don't know about you, but I learn best by seeing actual code. So,
here's a real world example. It grabs stock quotes off of NASDAQ's website.
phpDOM is a class library for creating, extending and manipulating XML documents. It is based on the DOM/XML library of PHP 4.x. It acts as a wrapper to the functions
provided by the DOM/XML library. It can be easily extended to reflect your needs and to create specific documents.
phpDOM includes two packages: phpDOM for pure XML, and phpDOM.XHTML for well-formed XHTML documents. These two packages can be used as examples of how to extend the base
phpDOM "tries" to cover the W3C DOM specification and offers a similar syntax to all functions like the W3C specifaction. Since the library depends on the DOM/XML library it
is currently not possible to provide all functions of the W3C DOM API, but it provides very good functionality to maintain XML documents as well as XHTML documents.
The code below is just a sample of how the library works, please refer to the "Example-Page" to get the entire library!
Turn your site into a pseudo-portal! This snippet lets you include news items from other websites that provide RDF / RSS files. You may, however, want to cache the RDF file
locally, as downloading it every time the page is hit is not only slow, but also rude.
Includes function parseRDF() which takes a filename (which can be a URL) as its parameter. Outputs HTML links for each item in the RDF file. Can also do images. Will
die if the file is invalid.
This is an OOP toolkit for creating WML-based applications and sites. It's not perfect yet, just a model. If anyone is interested in it, contact me, so I will send you the
updated version which also checks for valid code. There's no documentation and no comments in the code. Just see the example.
This Dynamic Flash FLV Progressive Video Player is powered by a PHP script that allows you to serve Flash FLV movies or video of any length from your website without needing
Flash communications server. The FLV files are displayed using a Flash MX dropdown list which is dynamically populated by php in XML format to the player. The php script
parses the working directory for any .FLV files and then generates that list in xml format which is loaded by the player.
* it works with any document XML storages in file or variable;
* It recovers data of any element or attribute;
* It indicates which elements constitute the document XML;
* It indicates which attributes belong to an element;
* it treats the mistakes exhibiting the line and the column where is the mistake highlighting;
* works with external entities.
* Trabalha com qualquer documento XML aramazenado em arquivo ou vari�vel;
* Recupera dados de qualquer elemento ou atributo;
* Indica quais elementos constituem o documento XML;
* Indica quais atributos pertencem a um elemento;
* Trata os erros exibindo a linha e destacando a coluna onde est� o erro;
* Trabalha com entities externas.
With this easy to use classes (Node and XML) you can parse a XML file into a tree-equivalent instead of using the event-based parsing that PHP provides. All nodes (=elements)
are inserted in an array, with data and attributes stored. This array can be then accessed. As an example, I wrote a function "print_nodes()" that prints the nodes in a nicely
formatted way (similar to what IE5.5 does, when it encounters a XML file). Based on this example, you should easily work with the class (extending it). I hope, there are
enough comments on this. Ah, forgot to mention: The print_nodes() can be formated with the vars $format_X in the XML-class. There are formatting possibilities for the element
name, attributes, attribute values, the brackets, the identation etc. Fixed in v0.2 Node-print_name bug.
very simple function that allows you to pass in the result of PHP4's xml_parse_into_struct() function and makes it a hierarchal array. the "subtree" sub array contains the xml
tags within the parent array.