Skip to content

Commit

Permalink
streamparser: just handle :characters raw
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.gna.org/svn/xmpp4r/trunk@504 fc81a325-65fc-0310-ab21-b05fd605316e
  • Loading branch information
Stephan M committed May 12, 2008
1 parent dca4632 commit e141e33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xmpp4r/lib/xmpp4r/streamparser.rb
Expand Up @@ -39,7 +39,7 @@ def parse
parser = REXML::Parsers::SAX2Parser.new @stream

parser.listen( :start_element ) do |uri, localname, qname, attributes|
e = REXML::Element::new(qname, nil, :raw => :all)
e = REXML::Element::new(qname)
e.add_attributes attributes
@current = @current.nil? ? e : @current.add_element(e)

Expand All @@ -61,7 +61,7 @@ def parse
end

parser.listen( :characters ) do | text |
@current.add(REXML::Text.new(text.to_s, @current.whitespace(), nil, @current.raw())) if @current
@current.add(REXML::Text.new(text.to_s, @current.whitespace, nil, true)) if @current
end

parser.listen( :cdata ) do | text |
Expand Down

0 comments on commit e141e33

Please sign in to comment.