From 0be032c6998e712dc2c9f2ed97c3491d89eb05af Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 31 Jan 2020 17:16:27 +0300 Subject: [xift] Almost done. --- examples/error.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/error.cpp (limited to 'examples/error.cpp') diff --git a/examples/error.cpp b/examples/error.cpp new file mode 100644 index 0000000..54bb17d --- /dev/null +++ b/examples/error.cpp @@ -0,0 +1,20 @@ +#include +#include + + +int main() +{ + XiftFile exporter(stdout); + Xift xift(exporter); + + xift.permitted.Tag("p").Attribute("class"); + + xift.PutFile("error.html"); + + if (!xift.End()) { + printf("Error on %d line, %d column:\n%s", + xift.ErrorLine(), xift.ErrorColumn(), xift.Error()); + } + + return 0; +} -- cgit v1.2.3