PHP Classes

File: examples/convert_file.php

Recommend this page to a friend!
  Classes of Temuri Takalandze   PHP XML to JSON Conversion   examples/convert_file.php   Download  
File: examples/convert_file.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP XML to JSON Conversion
Convert a XML document into a JSON string
Author: By
Last change:
Date: 3 years ago
Size: 490 bytes
 

Contents

Class file image Download
<?php

/*
 * This file is part of the abgeo/xml-to-json.
 *
 * Copyright (C) 2020 Temuri Takalandze <takalandzet@gmail.com>.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use ABGEO\XmlToJson\FileConverter;

require
__DIR__ . '/../vendor/autoload.php';

$converter = new FileConverter();

// Convert example.xml to example.json
$converter->convert(__DIR__ . '/example.xml', __DIR__ . '/example.json');