fpc/tests/test/packages/fcl-xml/thtmlwriter.pp
joost a2f5f7400b * Replaces several direct references to FNSI.QName by the NodeName property, so
that descendent classes can override the NodeName properly
 * Fixed an AV when GetNodeName is called and there is no NodeName set
 * Removed the THtmlCustomElement.NodeName property and override the GetNodeName
   method instead. The hashtable of TDOMNode_NS is not used because
   THtmlCustomElement uses a faster lookupsystem for tag/node-names
 * Added a basic test for the htmlwriter unit

git-svn-id: trunk@12732 -
2009-02-09 21:43:09 +00:00

27 lines
514 B
ObjectPascal

program TestHtmlWriter;
{$mode objfpc}{$H+}
uses
Classes, SysUtils, htmlwriter, htmlelements;
var hwriter: THtmlWriter;
hdoc : THTMLDocument;
begin
hdoc := THTMLDocument.Create;
hwriter := THTMLwriter.create(hdoc);
hwriter.Starthtml;
hwriter.Starthead;
hwriter.title('Test website');
hwriter.Endhead;
hwriter.Startbody;
hwriter.paragraph('test line 1');
hwriter.paragraph('test line 2');
hwriter.Endbody;
hwriter.Endhtml;
hwriter.Free;
writeln(hdoc.Asstring);
hdoc.Free;
end.