Skip to content

3.1.0

Choose a tag to compare

@JoshyPHP JoshyPHP released this 15 Nov 02:58
· 23 commits to master since this release
3.1.0

This version adds support for batch operations via document fragments. For example:

$dom = new s9e\SweetDOM\Document;
$dom->loadXML('<x/>');

$x = $dom->firstOf('//x');
$x->appendDocumentFragment(
	// The callback will be executed before the fragment is appended
	fn($fragment) => $fragment->appendXML('<y/><z/>')
);

echo $dom->saveXML($x);
<x><y/><z/></x>