Recommend this page to a friend! |
Download .zip |
Info | Example | View files (34) | Download .zip | Reputation | Support forum (2) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2008-05-19 (8 years ago) | 68% | Total: 1,819 | All time: 2,090 This week: 881 |
Version | License | PHP version | Categories | |||
qxml 1.0 | MIT/X Consortium ... | 5.0 | XML, PHP 5 |
Description | Author | |
This class can be used to generate XML documents from arrays and also parse XML documents to build arrays. Recommendations What is the best PHP array to xml class? |
Motivation: I wrote QXml because I didn't found a php class that was able to handle array to xml conversion sufficiently. QXML is able to preserve attributes and does a lot more. An array structure is geared to the structure of a simple xml object. SimpleXMLElement attributes are printed out (via print_r()-method) like the following: [@attributes] Analogous to this convention you have to declare a nested array by setting its name to @attributes: array ( "@attributes" => array("id" => "myID") "@textNode" => "MyTextNode Data" ); If you declare a nested array with @textNode as key, then a CDDATE escaped text node will be created. Otherwise new elements will be created. QSet is my favorite array helper class that allows array handling with ease. I adopted it from CakePHP. I renamed it, reconditioned it a bit and made some useful enhancements. QSet and QXML are working together. It is a strong team. It allows e.g. following: ARRAY to XML Conversion XML to Array Conversion XML to Object Conversion Array to Object Conversion (vice versa) By including the vendor classes Services_JSON from PEAR and the IBM xml2json class you can do this additionally: XML to JSON Conversion Array to JSON Conversion and so on. The other classes are for now just example classes. The QReflection class is an extraction from another project where i use it for documentary demands and purposes. I hope you enjoy this class as i do. best regards Thomas Schäfer |
Files |
File | Role | Description |
---|---|---|
data.php | Aux. | data file using complex node array |
dbd2propel.xsl | Data | Transform DB-Designer 4 to Symfony Schema |
demo_bookshop.xml | Data | Demo Bookshop XML |
gpx.xsd | Data | XSD file adopted from elsewhere.org |
green1.xsl | Data | Sample XML for FusionChart Sample |
JSON.class.php | Class | Service Class From PEAR |
menu.xml | Data | Data File for sample2 |
Propel2Doctrine.class.php | Class | DBDesigner -> Propel -> Doctrine Conversion |
QGoogleMapToGPX | Class | Convert GoogleMap Coordinates to GPS (adopted from JS at elsewhere.org) |
QReflection.class.php | Class | Reflection Class |
QSet.class.php | Class | Array Class adopted from CakePHP |
QTransform.class.php | Class | XSL Transform class |
QWhoIsIp.class.php | Class | Sample Class for showing how to convert arrays |
QXml.class.php | Class | QXML Class |
readme.txt | Doc. | readme |
residential.xml | Data | Sample XML for FusionChart Sample |
residential.xsl | Data | Sample XSL for FusionChart Sample |
sample.php | Example | Sample File |
sample2.php | Example | Sample File |
sample3.php | Example | Sample File: XML Output from Node for Flash XML |
sample3b.php | Example | Showing how to extend xml for FusionChart (XSL,XML) |
sample4.php | Example | Sample: Get IP-Info, convert to XML, convert to object and work on it |
sample5.php | Output | IP-Info to XML |
sample6.php | Example | convert Array to Xml to JSON |
sample_atom.php | Example | Sample Atom Feed |
sample_bookshop.php | Example | Transform Bookshop XML to Symfony Schema |
sample_doctrine.php | Example | Convert a DB Designer Scheme to Doctrine YML Scheme |
sample_feeds_oo.php | Example | Sample OO Feed Classes |
sample_googlegpx.php | Example | GPX XML from Google Routes |
sample_opml.php | Example | Sample OPML Feed |
sample_reflect.php | Example | Reflect a class and transform to xml; could be used for documentation |
sample_rss.php | Example | Sample RSS Feed |
Spyc.class.php | Aux. | SPYC - A Simple PHP YAML Class |
XMLJSON.class.php | Class | Service Class From IBM |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | User Comments (1) | ||||||||||||||||||||||||||||||||||
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.