I'd like to create a DataWeave transformation that produces an XML document that includes a DOCTYPE like so:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><!-- etc. --></head>
<body><!-- etc. --></body>
</html>
I haven't been able to find it in the DataWeave documentation so far. How can I accomplish this in DWL?
I'm using Mule 3.7.2 EE and Anypoint Studio 5.3.0.
I've been experimenting some, without any luck. I cant seem to set any custom output that aren't real elements.
When struck with this, I would output a simple placeholder at first (like plc or something, and then use a groovy script after data weave to replace that placeholder with the <!DOCTYPE tag.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With