Skip to content

peterfromearth/xsd-reader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Code Coverage Scrutinizer Code Quality

PHP XSD Reader

Read any XML Schema (XSD) programmatically with PHP.

Installation

There are two recommended ways to install the xsd-reader via Composer:

  • using the composer require command:
composer require 'goetas-webservices/xsd-reader'
  • adding the dependency to your composer.json file:
"require": {
    ..
    "goetas-webservices/xsd-reader" : "0.*",
    ..
}

Getting started

use Goetas\XML\XSDReader\SchemaReader;

$reader = new SchemaReader();
$schema = $reader->readFile("http://www.example.com/exaple.xsd");

// $schema is instance of Goetas\XML\XSDReader\Schema\Schema;

// Now you can navigate the entire schema structure

foreach ($schema->getSchema() as $innerSchema){

}
foreach ($schema->getTypes() as $type){

}
foreach ($schema->getElements() as $element){

}
foreach ($schema->getGroups() as $group){

}
foreach ($schema->getAttributes() as $attr){

}
foreach ($schema->getAttributeGroups() as $attrGroup){

}

Note

I'm sorry for the terrible english fluency used inside the documentation, I'm trying to improve it. Pull Requests are welcome.

About

Pure PHP XSD Reader (XML Schema)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%