akrabat / apigility-xml
Apigility module providing XML content-negotiation features
Installs: 103
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/akrabat/apigility-xml
Requires
- php: ^5.6 || ^7.0
- zendframework/zend-component-installer: ^1.0 || ^2.0
- zendframework/zend-serializer: ^2.7.7 || ^3.0.1
- zendframework/zend-stdlib: ^2.7.7 || ^3.0.1
- zendframework/zend-xml2json: ^3.0
- zfcampus/zf-apigility: ^1.3
- zfcampus/zf-content-negotiation: ^1.2
Requires (Dev)
This package is auto-updated.
Last update: 2025-10-05 23:22:43 UTC
README
This is an Apigility module to provide XML content-negotiation features. It allows for the rendering of payloads in XML and HAL+XML formats. It also supports ingesting HTTP bodies that are in XML format if the content-type is application/xml
The response type is based on Accept header:
- application/xml(or- application/*+xml) renders content in XML
- application/hal+json(or- application/*+json) renders content in HalJson.
Installation
- 
Install the module using composer: $ composer require akrabat/apigility-xml
- 
Add Akrabat\ApigilityXmltomodules.config.php:return [ ..., 'Akrabat\ApigilityXml', .... ]
- 
In the Apigility admin, select your API and change Content Negotiation Selector to HalJsonXML 
- 
Add application/xmlto Accept whitelist and Content-Type whitelist. Add other headers if needed.
- 
Save configuration 
Credits
This module is a fork of https://github.com/diegograssato/apigility-xml-negotiation which appears to be a fork of https://github.com/zpetr/apigility-xmlnegotiation which was inspired by the https://github.com/markushausammann's ApigilityXml.
Thanks to everyone who came before me!