Skip to content

Doctype #59

Discussion options

You must be logged in to vote

Hi @dagmanolis. Thanks.

If you have not, give a look a the Wiki page here: Exporting.

To export with an HTML 5 doctype, you can use $xml->html();
which produces

<!DOCTYPE html>
<book>
  ...
</book>

otherwise you can remove the doctype completely with $xml->html(true);
which produces

<book>
  ...
</book>

and you can prepend any doctype you want.

$doc_string = 
    $custom_doctype_string
    . $xml->html(true)
;

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by daniele-orlando
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants