Download the PHP package servo/fluidxml without Composer
On this page you can find all versions of the php package servo/fluidxml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download servo/fluidxml
More information about servo/fluidxml
Files in servo/fluidxml
Package fluidxml
Short Description Concise and fluent XML manipulation library
License BSD-2-Clause
Homepage https://github.com/servo-php/fluidxml
Informations about the package fluidxml
Changelog
2.0.0 (2023-11-06):
PHP 8.1 is the new minimum required version.
...
FluidXML
FluidXML is a PHP library designed to manipulate XML documents with a concise and fluent API.
It leverages the fluent programming pattern to be fun and effective.
Or, if you prefer, there is an extended syntax.
With FluidXML the DOM manipulation becomes fast, clear and expressive.
PHP Arrays are first class citizens.
XPath is king.
And CSS Selectors rock.
XML/CSS Namespaces are fully covered.
And sometimes XML Fragments are the fastest way.
Everything is fluent, even iterations.
You can map nodes easily too.
Whether some queries are too complex to express with XPath/CSS,
filtering is your friend.
Interoperability with existing DOMDocument and SimpleXML is simply magic.
Import them or inject them in any point of the FluidXML flow just like that.
Don't be shy and tell it: « IT'S AWESOME! » ^_^
Many other APIs are available:
__invoke()
append()
/appendSibling()
prepend()
/prependSibling()
addText()
text()
/setText()
addCdata()
cdata()
/setCdata()
addComment()
comment()
/setComment()
remove()
size()
/length()
load()
save()
dom()
xml()
html()
__toString()
array()
- ...
Still doubts?
FluidXML is fun to use, concise and effective.
If it's not enough, it has a comprehensive test suite with a 100% code coverage.
But you'll have the best answer trying it yourself.
Requirements
- FluidXML v2 (latest) requires PHP >= 8.1
- FluidXML v1 (legacy) requires PHP >=5.6 <8
Installation
-
Cloning the repository:
- Using Composer:
Getting Started
-
Cloning the repository:
- Using Composer:
use
classes and functions as you need.
See the ninja.
Documentation
10 minutes reading
Follow the Getting Started tutorial to become a ninja in no time.
Many other examples are available:
- inside the
doc/Examples/
folder - inside the
specs/FluidXml.php
file (as test cases)
All them cover from the simplest case to the most complex scenario.
Take a look at the APIs to discover all the available manipulation operations,
and go to the Wiki Page for more reading.
Donation
If you think this code is awesome or if you want to demonstrate
your immense gratitude ♥, buy me a coffe.
All versions of fluidxml with dependencies
ext-dom Version *
ext-simplexml Version *