Login   Register  
PHP Classes
elePHPant
Icontem

crXml: Manipulate XML documents as array

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Sandeep.C.R
Name: Sandeep.C.R <e-mail contact>
Packages: 2 Browse all classes by Sandeep.C.R Browse all classes by
Country: India India - PHP jobs in India
Age: 32
All time rank: 138876 in India India
Week rank: 593 Up50 in India India Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
Out the difficulties of using simpleXML for xml parsing in PHP(when it invlolves namespaces), I have created this PHP class, CRXML for xml Manipulation.

This class can be used to create, parse and manipulate XML documents using a combination of object and array notations.

It can create a new XML document or load an existing document from a string and allow applications to manipulate the xml using PHPs object and array notations.

The highlights of this class.

1. Name spaced nodes are accessed in the same manner as non-names paced ones, by using notation ->{'prefix:nodeName'}.

2. Php code generation for the access of any node;A feature useful in parsing complex xml strings.This is because, by manualy trying to find the path to a node, one may miss intermediate nodes or namespaces.This class solves that issue by generating statements to access a node.

3.Support for CDATA sections.

4.Better error reporting. When something error occurs, the class tries to respond with a helpful error message, together with the file and line number from which the initial call originated.

5.Full support for name spaced attributes.

6.XML generation made easy.Just add properties and keys to the crxml object to create nodes and attributes. A call to XML() method generates the corresponding XML string.

7.XML manipulation made easy. Uses assignment operator to copy nodes from one xml document to another.

  Classes of Sandeep.C.R  >  crXml  >  Download Download .zip .tar.gz  >  Support forum Support forum (6)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: crXml
Base name: crxml
Description: Manipulate XML documents as array
Version: 1.20
PHP version: 5.2.6
License: MIT/X Consortium License
All time users: 890 users
All time rank: 3618
Week users: 2 users
Week rank: 1166 Up
 
  Groups   Freshmeat project   Rate classes User ratings  
  Applications   Related links   Files Files  

  Groups  
Group folder image XML XML parsing and generation View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Data types Modeling and manipulating data types View top rated classes


  Innovation Award  
PHP Programming Innovation award winner
February 2011
Winner

Prize: One copy of the Zend Studio
One way to make XML document array processing is to retrieve its structure into an array.

This class provides a slightly different approach which is to provide an array interface to a XML DOM document structure, thus avoiding to convert the whole document into an array first.

Manuel Lemos

  Freshmeat project  
Project record: crxml
Popularity score: 63.95
Vitality score: 2.2

  User ratings  
There are not enough user ratings to display for this class.

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

  Related links  
Link Description
Live Demo A demo interface to generate and manipulate XML and also to see the output at once

  Files folder image Files  
File Role Description
Accessible without login Plain text file crXml.php Class The Class File
Accessible without login Plain text file generation-example.php Example Example to illustrate XML generation
Accessible without login Plain text file Generation-nameSpaceExample.php Example Exampe showing one way of using namespace
Accessible without login HTML file howto.html Doc. Instructions on how to use this class
Accessible without login Plain text file test.php Test Testcases for this class

Install with Composer Install with Composer - Download Download all files: crxml.tar.gz crxml.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.