xml-motor 0.1.3 → 0.1.4
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/CHANGELOG +10 -0
- data/README +1 -0
- data/lib/xml-motor/version.rb +1 -1
- data/lib/xml-motor/xml-index-handler.rb +1 -0
- data/lib/xml-motor/xml-stdout.rb +8 -2
- data/xml-motor.gemspec +1 -33
- metadata +6 -19
data/CHANGELOG
CHANGED
@@ -7,6 +7,16 @@
|
|
7
7
|
=====================================================================
|
8
8
|
CHANGE-LOG
|
9
9
|
=====================================================================
|
10
|
+
Changes from v0.1.3 to v0.1.4
|
11
|
+
[] Fixed node tree (like x.y.z) parsing for not existing node
|
12
|
+
[] Err/Info messages just shown when env has VERBOSE=''
|
13
|
+
=====================================================================
|
14
|
+
Changes from v0.1.2 to v0.1.3
|
15
|
+
[] just a Quick Fix to handle weird Attribute Values, main fix to come
|
16
|
+
=====================================================================
|
17
|
+
Changes from v0.1.1 to v0.1.2
|
18
|
+
[] Fixed Empty Node Handling, its been listed/counted as well
|
19
|
+
=====================================================================
|
10
20
|
Changes from v0.1.0 to v0.1.1
|
11
21
|
[] cleaned up usage for XML Mining of Pre-processed data
|
12
22
|
for e.g.
|
data/README
CHANGED
@@ -66,5 +66,6 @@ An easy-to-use XML Parser without any Native Dependencies.
|
|
66
66
|
+ XMLMotor.get_node_from_content "<A i='1'>a</A><B><A i='2'>ba</A></B>", "A", "i='1'"
|
67
67
|
RETURNS: ["a"]
|
68
68
|
|
69
|
+
To turn on the verbosity for errors in XML-Motor, set an Environment value for 'VERBOSE'.
|
69
70
|
=====================================================================
|
70
71
|
=====================================================================
|
data/lib/xml-motor/version.rb
CHANGED
data/lib/xml-motor/xml-stdout.rb
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
module XMLStdout
|
2
|
-
|
3
|
-
def self.
|
2
|
+
|
3
|
+
def self._err(mesag)
|
4
|
+
puts "ERROR:: #{mesag}" unless ENV['VERBOSE'].nil?
|
5
|
+
end
|
6
|
+
|
7
|
+
def self._nfo(mesag)
|
8
|
+
puts "INFO:: #{mesag}" unless ENV['VERBOSE'].nil?
|
9
|
+
end
|
4
10
|
end
|
data/xml-motor.gemspec
CHANGED
@@ -9,35 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.email = ["abhikumar163@gmail.com"]
|
10
10
|
s.homepage = "http://github.com/abhishekkr/rubygem_xml_motor"
|
11
11
|
s.summary = %q{An easy-to-use XML Parser without any Native Dependencies}
|
12
|
-
s.description = %q{A new short XML Parsing Algorithm implemented directly in
|
13
|
-
|
14
|
-
[How To Use]: https://github.com/abhishekkr/rubygem_xml_motor/raw/master/README
|
15
|
-
|
16
|
-
Loading:
|
17
|
-
+ $ gem install xml-motor
|
18
|
-
+ 'require' the 'xml-motor'
|
19
|
-
|
20
|
-
Usage:
|
21
|
-
[[ To Search Just One QUERY ]]
|
22
|
-
nodes_array = XMLMotor.get_node_from_file "_XML_FILE_"
|
23
|
-
nodes_array = XMLMotor.get_node_from_file "_XML_FILE_", "ATTRIB_KEY=ATTRIB_VALUE"
|
24
|
-
nodes_array = XMLMotor.get_node_from_content "_XML_DATA_"
|
25
|
-
nodes_array = XMLMotor.get_node_from_content "_XML_DATA_", "ATTRIB_KEY=ATTRIB_VALUE"
|
26
|
-
[[ To Search More Than One QUERIES ]]
|
27
|
-
str = {XML_DATA}
|
28
|
-
nodes_ = XMLMotor.splitter str
|
29
|
-
tags_ = XMLMotor.indexify nodes_
|
30
|
-
nodes_array = XMLMotor.xmldata nodes_, tags_, "_TAG_"
|
31
|
-
nodes_array = XMLMotor.xmldata nodes_, tags_, "_TAG_", "ATTRIB_KEY=ATTRIB_VALUE"
|
32
|
-
|
33
|
-
Example Calls As Code:
|
34
|
-
+ XMLMotor.get_node_from_content "<A>a</A><B><A>ba</A></B>", "A"
|
35
|
-
RETURNS: ["a", "ba"]
|
36
|
-
+ XMLMotor.get_node_from_content "<A>a</A><B><A>ba</A></B>", "B.A"
|
37
|
-
RETURNS: ["ba"]
|
38
|
-
+ XMLMotor.get_node_from_content "<A i='1'>a</A><B><A i='2'>ba</A></B>", "A", "i='1'"
|
39
|
-
RETURNS: ["a"]
|
40
|
-
}
|
12
|
+
s.description = %q{A new short XML Parsing Algorithm implemented directly in less-than-500 lines. An easy-to-use XML Parser without any Native Dependencies. Its under continuous improvement as being used/tested under my other xml-parsing required projects. [What, Why, HowTo]: http://justfewtuts.blogspot.in/2012/03/xml-motor-what-it-is-how-why-should-you.html }
|
41
13
|
|
42
14
|
s.rubyforge_project = "xml-motor"
|
43
15
|
|
@@ -45,8 +17,4 @@ Gem::Specification.new do |s|
|
|
45
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
46
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
47
19
|
s.require_paths = ["lib"]
|
48
|
-
|
49
|
-
# specify any dependencies here; for example:
|
50
|
-
# s.add_development_dependency "rspec"
|
51
|
-
# s.add_runtime_dependency "rest-client"
|
52
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xml-motor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,25 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04
|
12
|
+
date: 2012-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description: !
|
15
|
-
An easy-to-use XML Parser without any Native Dependencies
|
16
|
-
|
17
|
-
|
18
|
-
\ Usage:\n [[ To Search Just One QUERY ]]\n nodes_array
|
19
|
-
= XMLMotor.get_node_from_file \"_XML_FILE_\"\n nodes_array = XMLMotor.get_node_from_file
|
20
|
-
\"_XML_FILE_\", \"ATTRIB_KEY=ATTRIB_VALUE\"\n nodes_array = XMLMotor.get_node_from_content
|
21
|
-
\"_XML_DATA_\"\n nodes_array = XMLMotor.get_node_from_content \"_XML_DATA_\",
|
22
|
-
\"ATTRIB_KEY=ATTRIB_VALUE\"\n [[ To Search More Than One QUERIES ]]\n
|
23
|
-
\ str = {XML_DATA}\n nodes_ = XMLMotor.splitter str\n tags_
|
24
|
-
= XMLMotor.indexify nodes_\n nodes_array = XMLMotor.xmldata nodes_,
|
25
|
-
tags_, \"_TAG_\"\n nodes_array = XMLMotor.xmldata nodes_, tags_, \"_TAG_\",
|
26
|
-
\"ATTRIB_KEY=ATTRIB_VALUE\"\n\n Example Calls As Code:\n + XMLMotor.get_node_from_content
|
27
|
-
\"<A>a</A><B><A>ba</A></B>\", \"A\"\n RETURNS: [\"a\", \"ba\"]\n +
|
28
|
-
XMLMotor.get_node_from_content \"<A>a</A><B><A>ba</A></B>\", \"B.A\"\n RETURNS:
|
29
|
-
[\"ba\"]\n + XMLMotor.get_node_from_content \"<A i='1'>a</A><B><A i='2'>ba</A></B>\",
|
30
|
-
\"A\", \"i='1'\"\n RETURNS: [\"a\"]\n "
|
14
|
+
description: ! 'A new short XML Parsing Algorithm implemented directly in less-than-500
|
15
|
+
lines. An easy-to-use XML Parser without any Native Dependencies. Its under continuous
|
16
|
+
improvement as being used/tested under my other xml-parsing required projects. [What,
|
17
|
+
Why, HowTo]: http://justfewtuts.blogspot.in/2012/03/xml-motor-what-it-is-how-why-should-you.html '
|
31
18
|
email:
|
32
19
|
- abhikumar163@gmail.com
|
33
20
|
executables: []
|