polyrex 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/polyrex.rb +3 -1
- metadata +1 -1
data/lib/polyrex.rb
CHANGED
@@ -14,6 +14,7 @@ class Polyrex
|
|
14
14
|
include REXML
|
15
15
|
|
16
16
|
def initialize(location)
|
17
|
+
@id = '0'
|
17
18
|
open(location)
|
18
19
|
end
|
19
20
|
|
@@ -198,7 +199,8 @@ class Polyrex
|
|
198
199
|
@recordx.shift
|
199
200
|
end
|
200
201
|
|
201
|
-
|
202
|
+
ids = XPath.match(@doc.root, '//@id')
|
203
|
+
@id = ids.map{|x| x.value.to_i}.max.to_s.succ unless ids.empty?
|
202
204
|
|
203
205
|
#puts 'schema : ' + schema
|
204
206
|
load_handlers(schema)
|