Nodes ContentType - ThomasWeinert/FluentDOM GitHub Wiki
The FluentDOM\Nodes::$contentType
specifies if the mode is set to text/xml or text/html. This has effect on saving the document and will be set by the loader.
$fd = new FluentDOM\Nodes(
'<div>Hello World!<br/></div>', 'text/xml'
);
echo $fd, "\n";
$fd->contentType = 'text/html';
echo $fd;
Output:
<?xml version="1.0"?>
<div>Hello World!<br/></div>
<div>Hello World!<br></div>
See also: FluentDOM\Nodes::load()