Transforms a DocType
value to a string representation.
Introduced in DataWeave version 2.5.0.
This example transforms a DocType
value that includes a systemId
to a string representation.
%dw 2.0
import * from dw::xml::Dtd
output application/json
---
docTypeAsString({rootName: "cXML", systemId: "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd"})
This example transforms a DocType
value that includes a publicId
and systemId
to a string representation.
%dw 2.0
import * from dw::xml::Dtd
output application/json
---
docTypeAsString({rootName: "html", publicId: "-//W3C//DTD XHTML 1.0 Transitional//EN", systemId: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"})