From 218eb7183aad1aa68bcbc49e791141f509194767 Mon Sep 17 00:00:00 2001 From: Drahflow Date: Sat, 29 Mar 2014 15:49:47 +0100 Subject: Simplistic XML parser --- examples/working-loaded/lib | 1 + examples/working-loaded/xml.test | 23 +++++++++ examples/working-loaded/xml.test.xml | 91 ++++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 120000 examples/working-loaded/lib create mode 100644 examples/working-loaded/xml.test create mode 100644 examples/working-loaded/xml.test.xml (limited to 'examples') diff --git a/examples/working-loaded/lib b/examples/working-loaded/lib new file mode 120000 index 0000000..7d4b88b --- /dev/null +++ b/examples/working-loaded/lib @@ -0,0 +1 @@ +../../elymas/lib \ No newline at end of file diff --git a/examples/working-loaded/xml.test b/examples/working-loaded/xml.test new file mode 100644 index 0000000..8375638 --- /dev/null +++ b/examples/working-loaded/xml.test @@ -0,0 +1,23 @@ +"lib/xml.ey" include + +{ ==indent ==elem + indent { " " sys .out .writeall } rep + elem .name sys .out .writeall "\n" sys .out .writeall + elem .children { + indent 2 add dumpTree + } each +} /dumpTree deffst + +sys .file ":" via + "xml.test.xml" :open + 65536 :read ==content + :close + +{ + content xml .parse 0 dumpTree +} { + "Error during parse: " dump + .remaining dump +} ?!parse + +# vim: syn=elymas diff --git a/examples/working-loaded/xml.test.xml b/examples/working-loaded/xml.test.xml new file mode 100644 index 0000000..73deefd --- /dev/null +++ b/examples/working-loaded/xml.test.xml @@ -0,0 +1,91 @@ + + + + + Jens-Wolfhard Schicke - Drahflow - Welcome to my Homepage + + + +

Welcome to my Homepage

+

+Here I'll try to help anybody who (by what ever accident was necessary) +found this page, in using Linux and C(++). Feel free to browse whatever +files you encounter and mail +me whenever you have questions. This page does not use much images +mainly because I'm completely unable to design anything with graphics +so I stay with text. Additionally this provides you with faster load +times, although these don't matter much anymore in times of flatrates. +

+

+As a response to recent fancy ideas of our Government, I now support the +German Pirate Party +trying to stop the increasing surveillance in our country. +

+

+ +VIm Logo + +This is by far the +best text-editor +I ever encountered. Once you read +all the help files you have thousands of commands just a few keystrokes +away. +

+ +

+ +Valid HTML 4.01! + +The +W3C HTML Validator +states that this page is valid HTML 4.01, actually not does not mean a +thing because not all browsers are W3C compliant but at least it looks +nice, doesn't it? +

+ +

+ +Valid CSS! + +Another test of W3C, this time it's a +CSS test +for this page, which also returned this to be a valid page. +

+ +

+ +powered by Linux + +And of course this server runs on +Linux +the best operating system I got used to since now. +BSD is quite nice, too, but I not yet +relly dug myself into it. +

+ +

+ +powered by Apache + +This site is powered by +Apache, +one of the most often used Linux Webservers around. +

+ +

+ +Aktion UBERWACH! + +Don't be intimidated. The image referenced will only log accesses by our most beloved government. +

+ + -- cgit v1.2.3