-
Notifications
You must be signed in to change notification settings - Fork 20
Transformers
Thomas Weinert edited this page Jul 12, 2018
·
3 revisions
(FluentDOM >= 5.1)
Transformers take a DOM document and transform it into a new one.
This optimizes the xmlns/xmlns:* attributes in an document. It puts the prefix definition up into the farthest ancestor node possible.
You can provide a namespace to prefix mapping. The prefixes of all matching element/attributes are changed.
$transformer = new FluentDOM\Transformer\Namespaces\Optimize(
$document,
[
'http://www.w3.org/2005/Atom' => 'feed',
'http://www.w3.org/1999/xhtml' => ''
]
);
$target = $transformer->getDocument();
$target->formatOutput = TRUE;
echo $target->saveXML();
- Home
- Getting Started
- Tasks
- Plugins
- Functions
- Lists
- Creator (5.1)
- CSS Selectors
- Convertors
- Loaders
- Serializers (5.1)
- Transformers (5.1)
- Extended DOM
- XMLReader (6.1)
- XMLWriter (6.1)
- Interfaces