rexle 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- 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]}
|