Adding a processing instruction to a Rexle document

require 'rexle'

doc = Rexle.new '<a>123</a>'
doc.instructions #=> []
doc.xml #=> "<?xml version='1.0' encoding='UTF-8'?><a>123</a>" 

doc.instructions #=> [["xml", "version='1.0' encoding='UTF-8'"]]
doc.instructions.push %w(xml-stylesheet title='XSL_formatting' type='text/xsl' href='page.xsl')
doc.xml #=> "<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet title='XSL_formatting'?><a>123</a>" 

Tags:
Source:
1147hrs.txt
Published:
14-06-2014 11:47