rexle 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rexle.rb +5 -1
- metadata +1 -1
data/lib/rexle.rb
CHANGED
|
@@ -385,7 +385,11 @@ class Rexle
|
|
|
385
385
|
def to_s() self.xml end
|
|
386
386
|
def text(xpath) @doc.text(xpath) end
|
|
387
387
|
def root() @doc end
|
|
388
|
-
|
|
388
|
+
|
|
389
|
+
def write(f)
|
|
390
|
+
f.write "<?xml version='1.0' encoding='UTF-8'?>\n" + xml
|
|
391
|
+
end
|
|
392
|
+
|
|
389
393
|
def xml()
|
|
390
394
|
body = scan_print(self.root.children).join
|
|
391
395
|
a = self.root.attributes.to_a.map{|k,v| "%s='%s'" % [k,v]}
|