Skip to content
Thomas Weinert edited this page Jul 12, 2018 · 4 revisions

Serializers

Classes that can be used to convert the DOM document into a specific output format. They implement the magic method __toString().

The general usage syntax is:

echo new \FluentDOM\Serializer\Json\JsonML($node);

Json Serializers

These serializer classes implement JsonSerializeable. They can be used with json_encode().

echo json_encode(new \FluentDOM\Serializer\Json\JsonML($node), JSON_PRETTY_PRINT);

Supported Formats

(FluentDOM >= 5.1)

Clone this wiki locally