XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] XML Parse

On 31/01/12 20:54, Markus Braun wrote:
> I have this code:
> 
> #/usr/bin/env ruby
> require 'rubygems'
> require 'nokogiri'
> require 'open-uri'
> 
> doc =
> Nokogiri::HTML(open("http://mobile.bahn.de/bin/mobil/bhftafel.exe/dox?input=Richard-Strauss-Stra%DFe%2C+M%FCnchen%23625127&date=27.01.12&time=20%3A41&productsFilter=1111111111000000&REQTrain_name=&maxJourneys=10&start=Suchen&boardType=Abfahrt&ao=yes";))
> doc = doc.xpath('//div').each do |node|
> doc.remove_namespaces!
>  puts node.text
> end
> 
> 
> but get to many blank spaces...
> 
> how can i remove it?

Ask in the right place, like comp.lang.ruby
This mailing list is for XML, not Ruby.

>> From: liam@w3.org
[snip]
>> Sometimes working out who to ask is a large part of getting an answer.

Amen

///Peter


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS