Index: apps/xml/rdfExample.xotcl
===================================================================
diff -u
--- apps/xml/rdfExample.xotcl (revision 0)
+++ apps/xml/rdfExample.xotcl (revision ebcafa5bb50e140da6fbc08c754899ddbec31a64)
@@ -0,0 +1,76 @@
+#!/usr/bin/env tclsh
+# $Id: rdfExample.xotcl,v 1.2 2006/02/18 22:17:33 neumann Exp $
+#
+# small Example for usage of xoXML
+#
+package require XOTcl; namespace import -force xotcl::*
+package require xotcl::package
+package require xotcl::trace
+package require xotcl::rdf::parser
+package require xotcl::rdf::recreatorVisitor
+package require xotcl::xml::printVisitor
+
+#
+# instantiate parser and parser an example text into a node tree
+#
+RDFParser x
+x parse {
+
+
+
+
+ Mary Andrew
+ Jacky Crystal
+
+
+
+
+
+
+
+
+
+
+
+
+ The Coolest Web Page
+ Il Pagio di Web Fuba
+
+
+
+
+ some text
+
+
+
+
+}
+
+proc run {} {
+ #
+ # print the node treee to the std output
+ #
+ puts ************************************************************************
+ puts "Node Tree:"
+ puts ************************************************************************
+ PrintVisitor pv
+ foreach tn [x info children topNode*] {
+ pv interpretNodeTree $tn
+ }
+
+ #
+ # recreate xml text and print it to the std output
+ #
+ puts \n
+ puts ************************************************************************
+ puts "Recreated RDF Text:"
+ puts ************************************************************************
+ RDFRecreatorVisitor rv
+ foreach tn [x info children topNode*] {
+ set result [rv interpretNodeTree $tn]
+ puts $result
+ }
+}
+run
Index: apps/xml/xmlExample.xotcl
===================================================================
diff -u
--- apps/xml/xmlExample.xotcl (revision 0)
+++ apps/xml/xmlExample.xotcl (revision ebcafa5bb50e140da6fbc08c754899ddbec31a64)
@@ -0,0 +1,115 @@
+#!../../src/xotclsh
+#
+# small Example for usage of xoXML
+package require xotcl::package
+package require xotcl::trace
+package require xotcl::xml::parser
+package require xotcl::xml::recreatorVisitor
+package require xotcl::xml::printVisitor
+
+#
+# instantiate parser and parser an example text into a node tree
+#
+XMLParser x
+#x parse {
+#
+
+x parse {
+
+
+ a
+ b
+ c
+
+
+ b
+ c
+
+
+ a
+ b
+ c
+ b
+ d
+
+
+
+
+
+ Mary Andrew
+ Jacky Crystal
+
+
+
+
+
+
+
+
+
+
+
+
+ The Coolest Web Page
+ Il Pagio di Web Fuba
+
+
+
+
+ some text
+
+
+
+
+}
+
+proc run {} {
+ #
+ # print the node treee to the std output
+ #
+ puts ************************************************************************
+ puts "Node Tree:"
+ puts ************************************************************************
+ PrintVisitor pv
+ pv interpretAll x
+
+ #
+ # recreate xml text and print it to the std output
+ #
+ puts \n
+ puts ************************************************************************
+ puts "Recreated XML Text:"
+ puts ************************************************************************
+ XMLRecreatorVisitor rv
+ puts [rv interpretAll x]
+
+}
+run
+
+XMLParser y
+y parse {
+
+
+
+
+
+
+
+
+
+
+
+
+ olla
+
+
+
+
+ hallo
+
+
+}
+XMLRecreatorVisitor rv
+puts [rv interpretAll y]
Fisheye: Tag ebcafa5bb50e140da6fbc08c754899ddbec31a64 refers to a dead (removed) revision in file `library/rdf/rdfExample.xotcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag ebcafa5bb50e140da6fbc08c754899ddbec31a64 refers to a dead (removed) revision in file `library/xml/xmlExample.xotcl'.
Fisheye: No comparison available. Pass `N' to diff?