Installing .NET Framework 3.5

Posted in Errors by bcardiff on the November 22nd, 2007

Nice… of course I told it to ignore it ;-) .

installing_net35

Build Xml files in Ruby

Posted in Ruby by bcardiff on the November 7th, 2007

If you have to generate xml in ruby I suggest take a look at builder gems. It has really little overhead to generate xml. Take a look to this example:

require 'Builder'

xm = Builder::XmlMarkup.new( :target => $stdout , :indent => 2 )
xm.instruct!
xm.people do | p |
  p.person(:firstname => "brian", :lastname => "cardiff") do | a |
    a.cdata!("it's me!")
  end
  p.person(:firstname => "ary", :lastname => "borenszweig")
end

will print in stdout

<people>
  <person lastname="cardiff" firstname="brian">
    <!--[CDATA[it's me!]]-->
  </person>
  <person lastname="borenszweig" firstname="ary" />
</people>

the target parameter could be a string or file (or anything with << method).