-
-
Notifications
You must be signed in to change notification settings - Fork 0
Checklist and Further Reading
A35G edited this page Sep 10, 2026
·
1 revision
- Install with
composer require a35g/json-to-xml. - Decide on
rootName(anditemNodeNameif you expect lists of plain scalars). See Basic-Usage. - Use
@keyfor attributes and#textfor mixed content. See Conventions. - If you also convert in reverse (XML → JSON) and some tags must always stay lists, set
forceArrayTags. See Round-Trip-and-Limitations. - Wrap conversions in
try/catchif the incoming data isn't generated by your own application. See Security-and-Error-Handling. - If you generate many HTTP responses, use
jsonToXmlStdOut()and setsetTempDir()if the system temp directory isn't writable.
- The project's
README.md: full table of conventions and additional examples. - Automated tests (
JsonToXmlConverterTest.php,XmlToJsonConverterTest.php,LibraryIntegrityTest.php): a useful reference for edge-case behavior (empty lists, non-sequential numeric keys, boolean values, etc.).
⬅️ Previous page: Security-and-Error-Handling · 🏠 Back to: Home