rexle 0.5.9 → 0.5.10
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 +1 -0
- metadata +1 -1
data/lib/rexle.rb
CHANGED
|
@@ -291,6 +291,7 @@ class Rexle
|
|
|
291
291
|
def element(xpath) @doc.element(xpath) end
|
|
292
292
|
def text(xpath) @doc.text(xpath) end
|
|
293
293
|
def root() @doc end
|
|
294
|
+
def write() "<?xml version='1.0' encoding='UTF-8'?>\n" + xml end
|
|
294
295
|
def xml()
|
|
295
296
|
body = scan_print(self.root.children).join
|
|
296
297
|
"<%s>%s</%s>" % [self.root.name, body, self.root.name]
|