znframework / package-xml
ZN Framework XML Package
Installs: 7 068
Dependents: 6
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.0.0
- znframework/package-hypertext: >=6.0
- znframework/package-zerocore: >=6.0
README
ZN Framework XML Package
Follow the steps below for installation and use.
Installation
You only need to run the following code for the installation.
composer require znframework/package-xml
Documentation
Click for documentation of your library.
Example Usage
Basic level usage is shown below.
<?php require 'vendor/autoload.php'; ZN\ZN::run(); $data = XML::build ([ 'name' => 'media', 'attr' => ['id' => 1], 'child' => [ ['name' => 'video', 'attr' => ['id' => 2], 'content' => 'Vidyo'], [ 'name' => 'music', 'attr' => ['id' => 3], 'child' => [ ['name' => 'video', 'attr' => ['id' => 2], 'content' => 'Vidyo'], ['name' => 'video', 'attr' => ['id' => 2], 'content' => 'Vidyo'], ['name' => 'video', 'attr' => ['id' => 2], 'content' => 'Vidyo'] ] ] ] ]); Output::display($data);
<?xml version="1.0" encoding="UTF-8"?> <media id="1"> <video id="2">Vidyo</video> <music id="3"> <video id="2">Vidyo</video> <video id="2">Vidyo</video> <video id="2">Vidyo</video> </music> </media>