PHP Classes

File: readme.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Sudhir Chauhan  >  Binary XML  >  readme.txt  >  Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: readme.txt
Class: Binary XML
Generate and parse XML documents with binary files
Author: By
Last change:
Date: 6 years ago
Size: 773 bytes


Class file image Download
Created by
* 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

$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/');