goetas-webservices / xsd-reader
Read any XML Schema (XSD) programmatically with PHP
Fund package maintenance!
goetas
Patreon
www.goetas.com
Installs: 2 487 366
Dependents: 11
Suggesters: 0
Security: 0
Stars: 57
Watchers: 6
Forks: 40
Open Issues: 9
Requires
- php: ^8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.14
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.6
- sebastian/phpcpd: ^6.0
- vimeo/psalm: ^5.6
This package is auto-updated.
Last update: 2024-10-30 11:25:59 UTC
README
PHP XSD Reader
Read any XML Schema (XSD) programmatically with PHP.
Installation
The recommended way to install the xsd-reader
via Composer:
composer require 'goetas-webservices/xsd-reader'
Getting started
use GoetasWebservices\XML\XSDReader\SchemaReader; $reader = new SchemaReader(); $schema = $reader->readFile("http://www.example.com/example.xsd"); // $schema is instance of GoetasWebservices\XML\XSDReader\Schema\Schema; // Now you can navigate the entire schema structure foreach ($schema->getSchemas() 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
The code in this project is provided under the MIT license. For professional support contact goetas@gmail.com or visit https://www.goetas.com