XML library
Standalone XML capabilities
Secure streaming XML features with explicit schema mapping.
The XML library reads row-oriented and workbook-shaped XML, maps external element and attribute contracts to canonical fields, and writes configurable XML output with secure parser defaults.
- Package
- 1 XML
- Capabilities
- 10 Documented for this library
- Feature groups
- 5 Package-specific responsibilities
What you will learn
- See the XML row and workbook data capabilities.
- Understand schema mapping and parser security boundaries.
- Open the correct reading, writing, or mapping guide.
What this library includes
This page is limited to mnb/mnb-phpexcel-xml. Features from the monolithic package or another individual library are not mixed into this list.
composer require mnb/mnb-phpexcel-xml:^2.0Mnb\PHPExcel\Format\XmlPackage quick start
The example uses the individual-library API documented by this feature page.
<?php
require __DIR__ . '/vendor/autoload.php';
use Mnb\PHPExcel\Format\Xml;
$rows = Xml::read('customers.xml', [
'row_tag' => 'customer',
])->withHeaderRow(1)->rows();
Xml::write($rows, 'customers-copy.xml', ['row_tag' => 'customer']);Supported capabilities
Search the capabilities owned by this package and open the matching package-specific guide.
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Forward-only row parsing | Stream matching row elements with native XMLReader or the Core fallback. | Large XML feeds | Supported | Open guide |
| Logical sheet selection | Read workbook-shaped XML documents containing named sheet sections. | Multi-section contracts | Supported | Open guide |
| Header and column normalization | Map source fields into stable associative records. | Application imports | Supported | Open guide |
| Scalar type inference | Normalize supported booleans, numbers, nulls, dates, and strings. | Typed integrations | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Elements and attributes | Map nested elements and attributes to canonical application field names. | External XML contracts | Supported | Open guide |
| Explicit casting and defaults | Apply field types, defaults, and deterministic column order. | Reliable validation pipelines | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Configurable row-oriented XML | Write arrays or iterables with configurable root, sheet, row, and field tags. | Data exchange | Supported | Open guide |
| Workbook-shaped XML | Serialize multiple logical sheets and structured payloads. | Application archives | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Safe XML parsing defaults | Avoid external entity expansion and constrain parser/resource behavior. | Untrusted uploads | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Streaming column schemas | Pin field order and reject or ignore unexpected keys during streaming. | Stable large integrations | Supported | Open guide |
No matching feature found in this library.
Feature boundaries
These limits prevent individual-library documentation from being confused with the complete monolithic package.
| Capability | Status | What to use instead |
|---|---|---|
| Arbitrary document-preserving XML editor | Not supported: The package maps XML into row/workbook data; it is not a general DOM round-trip editor. | The package maps XML into row/workbook data; it is not a general DOM round-trip editor. |
| Spreadsheet presentation objects | Not supported: Styles, charts, and images are outside the XML row-data format contract. | Styles, charts, and images are outside the XML row-data format contract. |
| Database insertion | Not supported: Install the Database package for PDO validation and persistence workflows. | Install the Database package for PDO validation and persistence workflows. |
Was this guide useful?Use GitHub issues for corrections, missing examples, or unclear behavior.
Open an issue