Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Xml

Laravel Xml Laravel Package

flowgistics/laravel-xml

Laravel XML is a lightweight package for working with XML in Laravel apps. Parse, build, and convert XML documents to arrays or JSON using a simple, expressive API for reading and writing XML.

View on GitHub
Deep Wiki
Context7

Easily import and export XML data from your Laravel application

Frequently asked questions about Laravel Xml
How do I install Flowgistics laravel-xml in a Laravel app?
Install it with Composer using composer require flowgistics/laravel-xml. The package follows the typical Laravel package layout with a service provider and facade, so Laravel's package auto-discovery should register it without edits to config/app.php. After that you can resolve the XMLBuilder through its facade or inject it. Confirm you are on 1.2.0 or later if you want the PHPStan-oriented fixes.
Which Laravel and PHP versions does flowgistics/laravel-xml support?
The package is built as a Laravel package, and the technical evaluation suggests Laravel 10/11-era applications on PHP 8.1+ are the best fit, though the exact matrix should be confirmed in the repository's composer.json and CI configuration. There is no published evidence of framework-agnostic usage, so treat it as Laravel-only. Check the composer constraints before upgrading a production app.
Does laravel-xml support parsing XML as well as building it?
The overview describes parsing, building, and converting XML documents to arrays or JSON, and the core abstraction is an XMLBuilder. The depth of the parsing feature set is not fully documented in the release notes, so test your specific XML sources early. If you need advanced schema validation or XSLT, direct DOMDocument may still be the safer choice.
How do I convert an XML string to an array or JSON in Laravel?
Use the package's XMLBuilder API, which is designed to parse XML and convert documents into arrays or JSON. Wrap the call in a small service class so the conversion logic is testable and swappable. Because the README excerpt is limited, verify the exact method names against the installed source or facade docblocks.
Is flowgistics/laravel-xml protected against XXE and entity expansion attacks?
XML parsing is security-sensitive, and the available evaluation does not confirm whether libxml network access, external DTD loading, or entity expansion are disabled by default. Until that is verified in the source, avoid feeding untrusted XML into the package without hardening. For exposed endpoints, consider parsing with DOMDocument using LIBXML_NONET and disabled entity loading, or sanitize input first.
Do I need to register the XMLBuilder service provider or facade manually?
Laravel package auto-discovery should handle service provider and facade registration when you install via Composer. If you are on an older Laravel version or have discovery disabled, you may need to add them to config/app.php manually. Verify by resolving the facade in tinker before wiring it into application code.
Can I use flowgistics/laravel-xml to generate sitemaps or RSS feeds?
Yes, that is a natural fit: sitemaps, RSS/Atom feeds, SOAP payloads, and ERP/EDI exports are the use cases the package targets. The XMLBuilder abstraction is meant to keep XML emission expressive rather than string-concatenated. Put feed generation behind a queued job and an internal adapter if output volume is high.
Is flowgistics/laravel-xml actively maintained and safe for production?
The project appears small and single-maintainer-driven; version 1.2.0 is a narrow PHPStan-support fix and the first contribution from a new contributor. That is a bus-factor signal rather than a runtime defect, and the 1.1.1 to 1.2.0 upgrade carries effectively no behavioral risk. For production, pin a version, wrap XML output behind an interface, and monitor the repository for release cadence and security disclosures.
How do I test XML output generated with laravel-xml?
There is no published evidence that the package ships dedicated testing assertions, so assert on the generated XML string or parsed array using PHPUnit or Pest. Normalize whitespace and attribute ordering before comparing, since XML serialization order can vary. Adding a small adapter around XMLBuilder also lets you fake XML generation in feature tests.
What alternatives to flowgistics/laravel-xml should I consider?
The main alternatives are PHP's built-in DOMDocument and SimpleXML, which give full control over parsing, escaping, and libxml security flags. Spatie and other Laravel-focused packages cover adjacent XML and array-conversion needs, and for SOAP you may lean on your HTTP client plus a dedicated WSDL library. Choose laravel-xml when you want a thin, expressive Laravel-idiomatic builder and are comfortable with its maturity level.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo