PHP Classes

Binary XML: Generate and parse XML documents with binary files

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 489 All time: 5,883 This week: 455Up
Version License PHP version Categories
binary_image_in_xml 1.0GNU General Publi...5.1.2XML, PHP 5, Files and Folders
Description 

Author

This class can be used to generate and parse XML documents with binary files.

It can take a list of files and generate a XML document that includes the data of files using base64 encoding.

The class can also do the opposite, i.e. parse a previously generated XML document and recreate files contained in the document.

Picture of Sudhir Chauhan
Name: Sudhir Chauhan <contact>
Classes: 5 packages by
Country: India India
Age: 45
All time rank: 17610 in India India
Week rank: 206 Down12 in India India Down

Details

Created by chauhansudhir@gmail.com * This is an example to demonstatrate how we can embed binary in XML. Here an array of images path * given to generateBinaryXML method and XML document saved in the given path. savePath should be a * physical path because images are large in size and results large XML document. create output folder and implement the following code require('BinaryXML.php'); $binaryXML = new BinaryXML(); $savePath = 'test.xml'; $images = Array('1.jpg', '2.jpg', '3.jpg', '4.jpg'); $result = $binaryXML->generateBinaryXML($images, $savePath, true, '1.0'); if ($result) { print 'XML generated'; } else { print 'XML not generated'; } # parse XML and saves images to output folder $binaryXML->parseXML($savePath, 'output/');

  Files folder image Files (7)  
File Role Description
Accessible without login Image file 3.jpg Icon 3.jpg
Accessible without login Image file 1.jpg Icon Sample file for conversion
Accessible without login Plain text file readme.txt Doc. readme.txt
Accessible without login Plain text file index.php Example Example index.php
Plain text file BinaryXML.php Class Class that add or parse images in binary files
Accessible without login Image file 2.jpg Icon 2.jpg
Accessible without login Image file 4.jpg Icon 4.jpg

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:489
This week:0
All time:5,883
This week:455Up