xml-smart 0.3.0.1 → 0.3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +39 -32
- data/xml-smart.gemspec +1 -1
- metadata +28 -28
data/README.rdoc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
== XML::Smart - A Ruby class for fast and simple XML access
|
2
2
|
|
3
3
|
Copyright (C) 2004-2012 Jürgen Mangler <juergen.mangler@univie.ac.at>
|
4
4
|
|
@@ -10,46 +10,53 @@ This program is distributed without any warranty. See the file
|
|
10
10
|
|
11
11
|
== Installation
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
* Works on Linux, OSX, Windows
|
13
|
+
- Based on Nokogiri 1.5.5
|
14
|
+
- Thus works for MRI ruby 1.8.7, 1.9.x, JRuby (basically everything that is Nokogiri ready)
|
15
|
+
- Works on Linux, OSX, Windows
|
17
16
|
|
18
17
|
== Features
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
19
|
+
=== Principle of least surprise]
|
20
|
+
|
21
|
+
- Nokogiri is messy - violence always is
|
22
|
+
- libxml smells like old-school C-Binding ;-)
|
23
|
+
- rex is ... strange
|
24
|
+
|
25
|
+
=== Inherits Nokogiris GREAT compatibility for platforms and Ruby interpreters
|
26
|
+
|
27
|
+
=== XML only] - sorry, no css selectors, html, ... go to Nokogiri if you look for these
|
28
|
+
|
29
|
+
=== Great and convenient namespace support, compared to everything else out there
|
30
|
+
|
31
|
+
- use namespaces in xpaths without any additional work
|
32
|
+
|
33
|
+
doc = XML::Smart.string('<test xmlns:aaa="uri:aaa"><aaa:test/></test>')
|
34
|
+
doc.find('string(aaa:test)')
|
35
|
+
doc.close
|
36
|
+
|
37
|
+
- register your own shortcusts to be available in all XPaths
|
38
|
+
|
39
|
+
doc = XML::Smart.string('<test xmlns:aaa="uri:aaa"><aaa:test/></test>')
|
40
|
+
doc.register_namespace :a, 'uri:aaa'
|
41
|
+
doc.find('string(aaa:test)')
|
42
|
+
doc.close
|
43
|
+
|
44
|
+
|
45
|
+
=== NFS safe file locking while editing / reading from an XML file
|
38
46
|
|
39
47
|
XML::Smart.modify("EXAMPLE.xml","<test><names/></test>") { |doc|
|
40
48
|
doc.root.add("test_node")
|
41
49
|
}
|
42
50
|
|
43
|
-
Changes since 0.2.x (see Changelog)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
51
|
+
== Changes since 0.2.x (see Changelog)
|
52
|
+
|
53
|
+
- qname instead of name
|
54
|
+
- #register_namespace instead of #namespaces= to register shortcuts
|
55
|
+
- no more namespaces for #find necessary, all namespaces in document are automatically available.
|
56
|
+
- signals removed
|
57
|
+
- pull parser removed
|
50
58
|
|
51
59
|
== Documentation
|
52
60
|
|
53
|
-
Sorry, no inline code documentation yet. We have an extensive test suite, look
|
54
|
-
for examples there for now.
|
61
|
+
Sorry, no inline code documentation yet. We have an extensive test suite, look for examples there for now.
|
55
62
|
|
data/xml-smart.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xml-smart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0.
|
4
|
+
version: 0.3.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-12-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
16
|
-
requirement: &
|
16
|
+
requirement: &68385910 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *68385910
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: lockfile
|
27
|
-
requirement: &
|
27
|
+
requirement: &68384600 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *68384600
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: term-ansicolor
|
38
|
-
requirement: &
|
38
|
+
requirement: &68409090 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *68409090
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: minitest
|
49
|
-
requirement: &
|
49
|
+
requirement: &68408530 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,29 +54,29 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
58
|
-
description: ! "
|
57
|
+
version_requirements: *68408530
|
58
|
+
description: ! "== XML::Smart - A Ruby class for fast and simple XML access\n\nCopyright
|
59
59
|
(C) 2004-2012 Jürgen Mangler <juergen.mangler@univie.ac.at>\n\nRuby/XML/Smart is
|
60
60
|
freely distributable according to the terms of the\nGNU Lesser General Public License
|
61
61
|
(see the file 'COPYING').\n\nThis program is distributed without any warranty. See
|
62
|
-
the file\n'COPYING' for details.\n\n== Installation\n\n
|
63
|
-
Thus works for MRI ruby 1.8.7, 1.9.x, JRuby (basically everything that
|
64
|
-
ready)\n
|
65
|
-
\
|
66
|
-
;-)\n
|
67
|
-
and Ruby interpreters
|
68
|
-
if you
|
69
|
-
everything else out there
|
70
|
-
work\n
|
71
|
-
\
|
72
|
-
|
73
|
-
\
|
74
|
-
safe file locking while editing / reading from an XML
|
75
|
-
{ |doc|\n doc.root.add(\"test_node\")\n } \n\
|
76
|
-
qname instead of name\n
|
77
|
-
shortcuts\n
|
78
|
-
|
79
|
-
no inline code documentation yet. We have an extensive test suite, look
|
62
|
+
the file\n'COPYING' for details.\n\n== Installation\n\n- Based on Nokogiri 1.5.5\n-
|
63
|
+
Thus works for MRI ruby 1.8.7, 1.9.x, JRuby (basically everything that is Nokogiri
|
64
|
+
ready)\n- Works on Linux, OSX, Windows \n\n== Features\n\n=== Principle of least
|
65
|
+
surprise]\n\n- Nokogiri is messy - violence always is\n- libxml smells like old-school
|
66
|
+
C-Binding ;-)\n- rex is ... strange\n\n=== Inherits Nokogiris GREAT compatibility
|
67
|
+
for platforms and Ruby interpreters\n\n=== XML only] - sorry, no css selectors,
|
68
|
+
html, ... go to Nokogiri if you look for these \n\n=== Great and convenient namespace
|
69
|
+
support, compared to everything else out there\n\n- use namespaces in xpaths without
|
70
|
+
any additional work\n\n doc = XML::Smart.string('<test xmlns:aaa=\"uri:aaa\"><aaa:test/></test>')\n
|
71
|
+
\ doc.find('string(aaa:test)')\n doc.close\n\n- register your own shortcusts to
|
72
|
+
be available in all XPaths \n\n doc = XML::Smart.string('<test xmlns:aaa=\"uri:aaa\"><aaa:test/></test>')\n
|
73
|
+
\ doc.register_namespace :a, 'uri:aaa'\n doc.find('string(aaa:test)')\n doc.close\n\n\n===
|
74
|
+
NFS safe file locking while editing / reading from an XML file\n\n XML::Smart.modify(\"EXAMPLE.xml\",\"<test><names/></test>\")
|
75
|
+
{ |doc|\n doc.root.add(\"test_node\")\n } \n\n== Changes since 0.2.x (see Changelog)\n\n-
|
76
|
+
qname instead of name\n- #register_namespace instead of #namespaces= to register
|
77
|
+
shortcuts\n- no more namespaces for #find necessary, all namespaces in document
|
78
|
+
are automatically available.\n- signals removed\n- pull parser removed\n\n== Documentation\n\nSorry,
|
79
|
+
no inline code documentation yet. We have an extensive test suite, look for examples
|
80
80
|
there for now.\n\n"
|
81
81
|
email: juergen.mangler@gmail.com
|
82
82
|
executables: []
|