From: Manfred Date: 2003-03-03T16:54:43+09:00 Subject: Re: libxml and umlauts Hi, my first solution. #!/usr/bin/ruby require "xml/libxml" require "iconv" xd = XML::Document.file('./bill.xml') icon = Iconv.new('ISO-8859-1','UTF-8') puts icon.iconv(xd.find('/BILLITEM/PRODUCT_NAME').to_a[0].to_s) Maybe someone find a better solution? Manfred Hansen > Hi, > > i have try my first steps with libxml. > > The first problem i need the german umlauts (���..). > The second, i will get only one element like > "werte.elements["//INVOICE_NO"].text" in REXML > > Here my files: > bill.xml > > > > Anschlu� > > > #!/usr/bin/ruby > require "xml/libxml" > > xp = XML::Parser.new() > xd = XML::Document.file('./bill.xml') > xd.encoding='ISO-8859-1' > > werte = xd.find('/BILLITEM/PRODUCT_NAME') > werte.each do |n| > puts n # Anschlu� not � > end > > Manfred Hansen