Renders the specified XML element e as an entire HTML
document to a file fname, returning a URL
object for the written page.
You can supply any MillScript object as the fname, but
there are three points to consider:
e will be rendered to the file it specifies.
fname. If the fname
contains a period, anything up to the last one will be considered the
filename and anything after will be considered the extension. If the
fname doesn't contain a period, the extension "html" will
be appended automatically. e.g.
:-) htmlFile( "sample", <html/> );
About to render to .../output/sample.html
There is 1 result
/sample.html
:-) htmlFile( "sample.wml", <wml/> );
About to render to .../output/sample.wml
There is 1 result
/sample.wml
fname has already been created in the
current MillScript instance, the filename will have an integer
appended to it to make it unique. Please see the notes for the newURL function for more details.
:-) folder.addLast( "parent" );
There are 0 results
:-) htmlFile(
:-) "sample",
:-) <html>
:-) <head><title>"Sample page"</title></head>
:-) <body><h1>"Sample Page"</h1></body>
:-) </html>
:-) );
About to render to .../output/parent/sample.html
There is 1 result
/parent/sample.html
e will be rendered as HTML, with a few
important points:
&
meta, link, br
&#D;, where D is the decimal number for
the character in unicode.
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
htmlFile function
returns a URL object for the written page. This could then
be used for creating links to the page, etc.
URL object multiple times, each
successive use will replace the previously written file. See newURL for details.