PHPackages                             goetas-webservices/xsd-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. goetas-webservices/xsd-reader

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

goetas-webservices/xsd-reader
=============================

Read any XML Schema (XSD) programmatically with PHP

0.4.11(8mo ago)624.7M↓11.2%43[4 PRs](https://github.com/goetas-webservices/xsd-reader/pulls)13MITPHPPHP ^8.1CI passing

Since May 14Pushed 8mo ago4 watchersCompare

[ Source](https://github.com/goetas-webservices/xsd-reader)[ Packagist](https://packagist.org/packages/goetas-webservices/xsd-reader)[ Fund](https://www.goetas.com/)[ GitHub Sponsors](https://github.com/goetas)[ RSS](/packages/goetas-webservices-xsd-reader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (40)Used By (13)

[![Build status](https://github.com/goetas-webservices/xsd-reader/workflows/Build%20and%20test/badge.svg)](https://github.com/goetas-webservices/xsd-reader/actions?query=workflow%3A%22Build+and+test%22)[![Code Coverage Badge](./coverage_badge.svg)](./coverage_badge.svg)

PHP XSD Reader
==============

[](#php-xsd-reader)

Read any [XML Schema](http://www.w3.org/XML/Schema) (XSD) programmatically with PHP.

Installation
------------

[](#installation)

The recommended way to install the `xsd-reader` via [Composer](https://getcomposer.org/):

```
composer require 'goetas-webservices/xsd-reader'
```

Getting started
---------------

[](#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
----

[](#note)

The code in this project is provided under the [MIT](https://opensource.org/licenses/MIT) license. For professional support contact or visit

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance60

Regular maintenance activity

Popularity59

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~97 days

Total

36

Last Release

251d ago

PHP version history (4 changes)v0.1.0PHP &gt;=5.4.0

v0.3.0PHP ^7.1

0.3.8PHP ^7.1|^8.0

0.4.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/776743?v=4)[Asmir Mustafic](/maintainers/goetas)[@goetas](https://github.com/goetas)

---

Top Contributors

[![goetas](https://avatars.githubusercontent.com/u/776743?v=4)](https://github.com/goetas "goetas (144 commits)")[![Guite](https://avatars.githubusercontent.com/u/277531?v=4)](https://github.com/Guite "Guite (71 commits)")[![SignpostMarv](https://avatars.githubusercontent.com/u/304403?v=4)](https://github.com/SignpostMarv "SignpostMarv (45 commits)")[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (13 commits)")[![RSully](https://avatars.githubusercontent.com/u/185004?v=4)](https://github.com/RSully "RSully (12 commits)")[![holtkamp](https://avatars.githubusercontent.com/u/776405?v=4)](https://github.com/holtkamp "holtkamp (4 commits)")[![davidsonalencar](https://avatars.githubusercontent.com/u/3989763?v=4)](https://github.com/davidsonalencar "davidsonalencar (4 commits)")[![marckoehler](https://avatars.githubusercontent.com/u/96128291?v=4)](https://github.com/marckoehler "marckoehler (4 commits)")[![Toilal](https://avatars.githubusercontent.com/u/1165758?v=4)](https://github.com/Toilal "Toilal (4 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (3 commits)")[![rvdbogerd](https://avatars.githubusercontent.com/u/1301320?v=4)](https://github.com/rvdbogerd "rvdbogerd (3 commits)")[![allcode](https://avatars.githubusercontent.com/u/2942120?v=4)](https://github.com/allcode "allcode (2 commits)")[![mgrundkoetter](https://avatars.githubusercontent.com/u/1526725?v=4)](https://github.com/mgrundkoetter "mgrundkoetter (1 commits)")[![toooni](https://avatars.githubusercontent.com/u/241080?v=4)](https://github.com/toooni "toooni (1 commits)")[![jbuncle](https://avatars.githubusercontent.com/u/11473689?v=4)](https://github.com/jbuncle "jbuncle (1 commits)")[![zambodaniel](https://avatars.githubusercontent.com/u/3462880?v=4)](https://github.com/zambodaniel "zambodaniel (1 commits)")

---

Tags

phpwebservicexml-schemaxsdxsd-readerphpxmlparserxsdxmlschema

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/goetas-webservices-xsd-reader/health.svg)

```
[![Health](https://phpackages.com/badges/goetas-webservices-xsd-reader/health.svg)](https://phpackages.com/packages/goetas-webservices-xsd-reader)
```

###  Alternatives

[goetas-webservices/xsd2php

Convert XSD (XML Schema) definitions into PHP classes and JMS metadata

2411.6M37](/packages/goetas-webservices-xsd2php)[goetas-webservices/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

4910.9M36](/packages/goetas-webservices-xsd2php-runtime)[orchestra/parser

XML Document Parser for Laravel and PHP

4581.7M5](/packages/orchestra-parser)[corveda/php-sandbox

A PHP library that can be used to run PHP code in a sandboxed environment

23483.5k2](/packages/corveda-php-sandbox)[goetas/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

493.3k](/packages/goetas-xsd2php-runtime)[bupy7/xml-constructor

The array-like constructor of XML document structure.

1337.9k](/packages/bupy7-xml-constructor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
