[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

reformat with Hpricot?

Phlip

8/23/2007 7:55:00 AM

Rubies:

Here's how to indent with REXML:

doc = Document.new('<yo><dude /><yo>')
indent_spaces = 2
doc.write($stdout, indent_space)

That produces:

<yo>
<dude />
<yo>

How can Hpricot "pretty print" like that??

--
Phlip
http://www.oreillynet.com/onlamp/blog/2007/08/assert_hpri...
1 Answer

Philip Gatt

9/4/2007 12:46:00 AM

0

Very interesting question. I don't know the answer, but I'll *bump*
this post for ya!


On Aug 23, 2007, at 7:05 AM, Phlip wrote:

> Rubies:
>
> Here's how to indent with REXML:
>
> doc = Document.new('<yo><dude /><yo>')
> indent_spaces = 2
> doc.write($stdout, indent_space)
>
> That produces:
>
> <yo>
> <dude />
> <yo>
>
> How can Hpricot "pretty print" like that??
>
> --
> Phlip
> http://www.oreillynet.com/onlamp/blog/2007/08/assert_hpri...
>