Skip to content

Light weight library to convert XML files to JSON or Array

License

Notifications You must be signed in to change notification settings

BLVCKGVD/xml_lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xml_lib

Light weight library to convert XML files to JSON or Array

MIT License

PHP

ext-simplexml

ext-json

ext-libxml

Made By

Installation

Install currencylib with composer

  composer require blvckgvd/xml_lib

Usage/Examples

Get JSON from XML

use Blvckgvd\XmlLib\XmlLib;

public function getArrayFromXml() {
  $json = XmlLib::toJson('<path to xml>');
  return $json;
}
// will return json

Get Array from XML

use Blvckgvd\XmlLib\XmlLib;

public function getArrayFromXml() {
  $arr = XmlLib::toArray('<path to xml>');
  return $arr;
}
// will return array

About

Light weight library to convert XML files to JSON or Array

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages