testhtml.pp 351 B

12345678910111213141516171819
  1. program testhtml;
  2. {
  3. simple demo to demonstrate rewriting a HTML file
  4. }
  5. uses sysutils, dom_html,sax_html, XMLWrite;
  6. Var
  7. H : THTMLDocument;
  8. begin
  9. if ParamCount<>2 then
  10. begin
  11. Writeln('Usage: ',ExtractFileName(Paramstr(0)),' inputfile outputfile');
  12. Halt(1);
  13. end;
  14. ReadHTMLFile(H,ParamStr(1));
  15. WriteXMLFile(H,Paramstr(2));
  16. end.