|
Copyright (c) 2001-2002 by Jim Menard <jimm@io.com>
Released under the same license as Ruby. See www.ruby-lang.org/en/LICENSE.txt.
Using the Tokenizer, this script prints an XML document with all text reversed. We achieve this by overriding Text#to_s to return its text reversed, then using the Tokenizer to step through the document so we can print each entity.
usage:
reverseText.rb <file.xml>
Required files |
Classes and Modules |