RubyGems Navigation menu

ruby-xml-smart 0.2.99.3

XML::Smart - A Ruby class for fast and simple XML access

Copyright (C) 2004-2012 Jürgen Mangler <juergen.mangler@univie.ac.at>

Ruby/XML/Smart is freely distributable according to the terms of the GNU Lesser General Public License (see the file 'COPYING').

This program is distributed without any warranty. See the file 'COPYING' for details.

Installation

This is just a transitional package intended to require the nokogiri based version of xml-smart.

Documentation

View the examples in the ./examples subdirectory. In the ./examples/Visualise subdirectory you can find a simple XPath visualiser. Never try to mix this module with other libxml bindings, or you will get nasty segfaults.

SYNOPSIS TO CHANGE A FILE ON THE DISK

require 'xml/smart'

XML::Smart.modify(File.dirname($0) + "/EXAMPLE.xml") { |doc|
  node = doc.find("/test/names").first
  node.add("test_node",{"attr" => 12}, "Muahaha")
  node.add("test_node", "Muahaha", "attr" => 13)
  node.add("test_node", "attr" => 14)
  node.add("test_node", "Muahaha")
  node.add("test_node")
}

SYNOPSIS TO QUERY A FILE

require 'xml/smart'

doc = XML::Smart.open(File.dirname($0) + "/EXAMPLE.xml")

node = doc.find("/test/names").first
puts = node.find("string(name)")

Versions:

  1. 0.2.99.3 - December 12, 2012 (35 KB)
  2. 0.2.99.2 - December 12, 2012 (35 KB)
  3. 0.2.99.1 - December 12, 2012 (35 KB)
  4. 0.2.99 - December 12, 2012 (46 KB)
  5. 0.2.7 - May 20, 2012 (66 KB)
Show all versions (21 total)

Runtime Dependencies:

Authors:

  • Juergen Mangler

Owners:

65754e11f0c4a3ac3a37632107b4b3f3

Sha 256 checksum:

4d8f773759dc522563cba683e1c020b492dde1a89bfd6d43688edd9a492224a8

Total downloads 24,405

For this version 889

Show all versions (21 total)

Required Ruby Version: None

Licenses:

N/A

Gemfile:
= Copy to clipboard Copied!

install:
= Copy to clipboard Copied!

Links: