Skip to content
Browse files

Added prittyxml

  • Loading branch information...
1 parent 2c62d39 commit 89be4ff806c5cbd3a1422c2d3ed467f4595a47f9 @dbrady committed Jun 1, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 prittyxml
View
12 prittyxml
@@ -0,0 +1,12 @@
+#!/usr/bin/env ruby
+#
+# prittyxml - Receive a file or stream of XML and display it prittified
+
+# So I wrot this big huge nasty string-scanning monster, but all I
+# really need is this
+#
+# ...but this requires ActiveSupport v >3.0, so... ouch. Dunno. Gonna
+# go ahead and use it since it gives me 99% of what I need for now.
+require 'active_support/core_ext'
+puts Hash.from_xml(ARGF.read).to_xml
+

0 comments on commit 89be4ff

Please sign in to comment.
Something went wrong with that request. Please try again.