=begin
/*
$Id: qt/examples/xml/tagreader/structureparser.cpp   2.2.4   edited 2001-01-22 $
*/
=end
require "qt2"
include Qt2
require "qt2xml"
include Qt2xml
#include "structureparser.h"

#include <iostream.h>
#include <qstring.h>
 
class StructureParser < QXmlRubyHandler

def startDocument()
    @indent = ""
    TRUE
end

def startElement( qstr1, qstr2,  qName,  qattr )

    print @indent.to_str, qName.to_str, "\n"
    @indent += "    "
    TRUE
end

def endElement( qstr1, qstr2, qstr3 )

    @indent[0..3]=""
    TRUE
end
end

