From eac37c6a45837f7ea717c9fed8cb21e2d5665618 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 31 Jan 2020 17:36:15 +0300 Subject: [xift] Working. --- examples/Makefile | 4 ++-- examples/error.cpp | 5 +++-- examples/filter.cpp | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/Makefile b/examples/Makefile index 3f40167..60df4ff 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -12,9 +12,9 @@ CPPFLAGS += -O3 endif INCLUDE = -I../src -LFLAGS = -L.. -lxenophage +LFLAGS = -L.. -lxift -XENOPHAGE = ../libxenophage.a +XENOPHAGE = ../libxift.a default: $(EXAMPLES) diff --git a/examples/error.cpp b/examples/error.cpp index 54bb17d..72c5bfe 100644 --- a/examples/error.cpp +++ b/examples/error.cpp @@ -7,13 +7,14 @@ int main() XiftFile exporter(stdout); Xift xift(exporter); - xift.permitted.Tag("p").Attribute("class"); + xift.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()); + xift.ErrorLine(), xift.ErrorColumn(), + xift_error_message(xift.GetError())); } return 0; diff --git a/examples/filter.cpp b/examples/filter.cpp index 6e786c9..48d0a6a 100644 --- a/examples/filter.cpp +++ b/examples/filter.cpp @@ -8,7 +8,7 @@ int main() Xift xift(exporter); xift.Tag("a").Attribute("href"); - XiftTags::Tag &p = xift.Tag("p"); + XiftTag &p = xift.Tag("p"); p.Attribute("class"); p.Attribute("hidden"); p.Attribute("id"); @@ -21,7 +21,8 @@ int main() if (!xift.End()) { printf("Error on %d line, %d column:\n%s", - xift.ErrorLine(), xift.ErrorColumn(), xift.Error()); + xift.ErrorLine(), xift.ErrorColumn(), + xift_error_message(xift.GetError())); } return 0; -- cgit v1.2.3