rexle 1.2.16 → 1.2.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rexle.rb +27 -15
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96b06805f1f9fa28c3fd472f6b4b00151b27d241
|
4
|
+
data.tar.gz: ab2434b0abfcdca97aec40ffcdec8799987e3a59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 640a709e2412e6cb48d027a431bb277262e3286a6c351d7e88afa39e128dbe04b5db260feeeaae7a19df389d14fd5f5ae115d86f718a831923f0fc52ced02492
|
7
|
+
data.tar.gz: 379ae6600f4c7aa574131ed93fc75b244ba6a50a1aee79d2bc1eec6a902ab1717875a120a24c2143c22633654147ffd903d5f3598a951f24185aa23788d4483f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -13,6 +13,8 @@ require 'cgi'
|
|
13
13
|
|
14
14
|
# 25-Feb-2015: feature: Rexle#inspect now displays the
|
15
15
|
# 1st 100 characters of XML
|
16
|
+
# bug fix: If another parser can't be selected, the
|
17
|
+
# default parser is used
|
16
18
|
# 16-Feb-2015: bug fix: Rexle::Element#value assignment is now made by
|
17
19
|
# value instead of reference
|
18
20
|
# 11-Feb-2015: bug fix: add_text now adds a String to @child_elements.
|
@@ -169,11 +171,8 @@ module XMLhelper
|
|
169
171
|
end
|
170
172
|
end
|
171
173
|
|
172
|
-
def inspect()
|
173
|
-
|
174
|
-
xml = self.xml declaration: false
|
175
|
-
"#<Rexle:%s xml=\"%s\">" % \
|
176
|
-
[self.object_id, xml.length > 100 ? xml[0..96] + '...>' : xml]
|
174
|
+
def inspect()
|
175
|
+
"#<Rexle:%s>" % [self.object_id]
|
177
176
|
end
|
178
177
|
|
179
178
|
def processing_instructions(s='')
|
@@ -1263,6 +1262,15 @@ class Rexle
|
|
1263
1262
|
|
1264
1263
|
private
|
1265
1264
|
|
1265
|
+
def parse_rexle(x)
|
1266
|
+
|
1267
|
+
rp = RexleParser.new(x)
|
1268
|
+
a = rp.to_a
|
1269
|
+
|
1270
|
+
@instructions = rp.instructions
|
1271
|
+
return a
|
1272
|
+
end
|
1273
|
+
|
1266
1274
|
def parse_string(x)
|
1267
1275
|
|
1268
1276
|
# check if the XML string is a dynarex document
|
@@ -1276,22 +1284,26 @@ class Rexle
|
|
1276
1284
|
#'polyrex' => proc {|x| PolyrexParser.new(x).to_a},
|
1277
1285
|
'polyrex' => proc {|x| RexleParser.new(x).to_a}
|
1278
1286
|
}
|
1279
|
-
procs[recordx_type]
|
1287
|
+
other_parser = procs[recordx_type]
|
1288
|
+
|
1289
|
+
if other_parser then
|
1290
|
+
|
1291
|
+
other_parser.call(x)
|
1292
|
+
|
1293
|
+
else
|
1294
|
+
|
1295
|
+
parse_rexle x
|
1296
|
+
|
1297
|
+
end
|
1280
1298
|
|
1281
1299
|
else
|
1282
1300
|
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
@instructions = rp.instructions
|
1287
|
-
return a
|
1301
|
+
parse_rexle x
|
1302
|
+
|
1288
1303
|
end
|
1289
1304
|
else
|
1290
1305
|
|
1291
|
-
|
1292
|
-
a = rp.to_a
|
1293
|
-
@instructions = rp.instructions
|
1294
|
-
return a
|
1306
|
+
parse_rexle x
|
1295
1307
|
|
1296
1308
|
end
|
1297
1309
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|