stormcode / xsd-reader-laravel-cached
使用PHP编程方式读取任何XML Schema (XSD)
v1.0
2023-01-21 23:40 UTC
Requires
- php: ^8.1
- illuminate/database: ^9.0
- illuminate/support: ^9.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.10
- phpunit/phpunit: ^7.0|^8.0|^9.0
- sebastian/phpcpd: ^4.0|^5.0|^6.0
- vimeo/psalm: ^3.14
This package is auto-updated.
Last update: 2024-09-22 03:29:07 UTC
README
使用PHP编程方式读取任何XML Schema (XSD)。
安装
推荐通过Composer安装xsd-reader
composer require 'stormcode/xsd-reader-laravel-cached'
入门指南
use CollectHouse\XML\XSDReader\SchemaReader; $reader = new SchemaReader(); $schema = $reader->readFile("http://www.example.com/exaple.xsd"); // $schema is instance of CollectHouse\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){ }
注意
本项目中的代码遵循MIT许可证。如需专业支持,请联系goetas@gmail.com或访问https://www.goetas.com