sax_stream 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ module SaxStream
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def path_parts
|
17
|
-
@path.split('/')
|
17
|
+
@path.split('/').reject {|part| part.nil? || part == ''}
|
18
18
|
rescue => e
|
19
19
|
raise "could not split #{@path.inspect} for #{@name.inspect}"
|
20
20
|
end
|
@@ -40,7 +40,10 @@ module SaxStream
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def find_or_insert_child_element(doc, base, part)
|
43
|
+
return base if part.nil?
|
43
44
|
base.search(part).first || insert_child_element(doc, base, part)
|
45
|
+
rescue Nokogiri::XML::XPath::SyntaxError => e
|
46
|
+
raise "Nokogiri syntax error when searching for path part #{part.inspect} as part of #{@path.inspect} for #{@name.inspect} mapping "
|
44
47
|
end
|
45
48
|
|
46
49
|
def insert_child_element(doc, base, part)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sax_stream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
16
|
-
requirement: &
|
16
|
+
requirement: &70202012936540 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 1.5.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70202012936540
|
25
25
|
description: A streaming XML parser which builds objects and passes them to a collecter
|
26
26
|
as they are ready. Based upon Nokogiri SAX parsing functionality.
|
27
27
|
email:
|