MNB PHPExcelDeveloper Guide
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

Updated

LevelAll levelsReading time4 minPackagemnb/mnb-phpexcel-xml

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.

Installcomposer require mnb/mnb-phpexcel-xml:^2.0
Primary APIMnb\PHPExcel\Format\Xml
ScopeIndividual libraryFocused dependency and package-local API

Package quick start

The example uses the individual-library API documented by this feature page.

xml-features.php
<?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.

10 of 10 features

Reading4 capabilities
FeatureWhat it doesTypical useSupportGuide
Forward-only row parsingStream matching row elements with native XMLReader or the Core fallback.Large XML feedsSupportedOpen guide
Logical sheet selectionRead workbook-shaped XML documents containing named sheet sections.Multi-section contractsSupportedOpen guide
Header and column normalizationMap source fields into stable associative records.Application importsSupportedOpen guide
Scalar type inferenceNormalize supported booleans, numbers, nulls, dates, and strings.Typed integrationsSupportedOpen guide
Schema mapping2 capabilities
FeatureWhat it doesTypical useSupportGuide
Elements and attributesMap nested elements and attributes to canonical application field names.External XML contractsSupportedOpen guide
Explicit casting and defaultsApply field types, defaults, and deterministic column order.Reliable validation pipelinesSupportedOpen guide
Writing2 capabilities
FeatureWhat it doesTypical useSupportGuide
Configurable row-oriented XMLWrite arrays or iterables with configurable root, sheet, row, and field tags.Data exchangeSupportedOpen guide
Workbook-shaped XMLSerialize multiple logical sheets and structured payloads.Application archivesSupportedOpen guide
Security1 capabilities
FeatureWhat it doesTypical useSupportGuide
Safe XML parsing defaultsAvoid external entity expansion and constrain parser/resource behavior.Untrusted uploadsSupportedOpen guide
Scale1 capabilities
FeatureWhat it doesTypical useSupportGuide
Streaming column schemasPin field order and reject or ignore unexpected keys during streaming.Stable large integrationsSupportedOpen guide

Feature boundaries

These limits prevent individual-library documentation from being confused with the complete monolithic package.

CapabilityStatusWhat to use instead
Arbitrary document-preserving XML editorNot 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 objectsNot 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 insertionNot supported: Install the Database package for PDO validation and persistence workflows.Install the Database package for PDO validation and persistence workflows.