parse (REXML::Parsers::LightParser)

    # File src/rexml/parsers/lightparser.rb, line 18
                            def parse
                                    root = context = REXML::Light::Node.new([ :document ])
                                    while true
                                            event = @parser.pull
                                            case event[0]
                                            when :end_document
                                                    break
                                            when :end_doctype
                                                    context = context.parent
                                            when :start_element, :start_doctype
                                                    new_node = REXML::Light::Node.new(event)
                                                    context << new_node
                                                    new_node.parent = context
                                                    context = new_node
                                            when :end_element, :end_doctype
                                                    context = context.parent
                                            else
                                                    new_node = REXML::Light::Node.new(event)
                                                    context << new_node
                                                    new_node.parent = context
                                            end
                                    end
                                    root
                            end