public
Description: A drop-in replacement for Builder::XmlMarkup which uses libxml for speed and security.
Homepage:
Clone URL: git://github.com/codahale/faster-builder.git
codahale (author)
Mon Aug 04 17:14:13 -0700 2008
commit  565bd693791854dd020c4b51776016ae15e8b5cd
tree    65fa081b165da518a5a5247a9fdc0efd9feb584b
parent  ac3f6c670a1f4605d90017b7018f0910cd54b6cc
name age message
file CHANGELOG Mon May 12 09:42:39 -0700 2008 Added an initial entry to the changelog. [codahale]
file MIT-LICENSE Mon May 12 09:31:42 -0700 2008 Initial commit. Surprisingly complete as such. [codahale]
file README.markdown Mon Aug 04 09:31:54 -0700 2008 Don't make the README executable -- that's just... [codahale]
file Rakefile Mon Aug 04 17:12:29 -0700 2008 Fix the gem task. [codahale]
directory lib/ Mon Aug 04 17:14:13 -0700 2008 Quick refactor, courtesy of Jared Kuolt. [codahale]
directory spec/ Mon Aug 04 10:19:52 -0700 2008 libxml-ruby now uses the BOM markings for UCS-2. [codahale]
README.markdown

FasterBuilder

Differences from Builder::XmlMarkup

  • Does not allow for unescaped text to be appended to element contents:

    xml.dip do
      xml << "<blorp>"
    end
    xml.target! #=> "<dip>&lt;blorp&gt;</dip>" instead of <dip><blorp></dip>
    
    This is a security/validity issue and isn't going to change.
  • Does not allow XML prologs to be inserted in the middle of the document:

    xml.dip do
      xml.instruct!
    end
    xml.target! #=> '<?xml version="1.0" encoding="UTF-8"?>\n<dip/>'
    
    This is a security/validity issue and isn't going to change.
  • Does not allow for unescaped symbol attribute values:

    xml.dingo(:name => :"SUPA<<FREAK")
    xml.target! #=> '<dingo name="SUPA&lt;&lt;FREAK"/>'
    
    This is a security/validity issue and isn't going to change.
  • Doesn't detect and avoid double-escaping. (I'm working on this.)

  • Doesn't generate declarations. (I'm working on this.)
  • Doesn't generate non-XML prologs. (I'm working on this.)
  • Doesn't generate standalone XML prologs. (I'm working on this.)
  • Doesn't support indentation options. (I'm working on this.)