From: dare ruby Date: 2007-12-12T12:44:50+09:00 Subject: using if block_given? method. Hi everybody, I have created a simple parser. i have used @tag method to store tag start and tag end. my requirement is how to read attributes and its values when it has more than one attributes like, This is the input string, I need output like tag start : aaa attribute name: size attribute value : 100 attribute name : name attribute value : size tag end : aaa i have read character by character and i have executed tag start and tag end. i have read attribute naes and values also but my program actually not displaying it properly like my output is tag start : aaa attribute name : name attribute value : size tag end : aaa my program is actually rewritting the old ones. i have used @tag to store tag start and tag end and i have called thosed using if block_given? method. i have used parse_attribute, parse_attribute_value method to read attribute names and values. How tyo make it work properly when multiple atrribute names and values are given. Thanks in advance -- Posted via http://www.ruby-forum.com/.