relaton-omg 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_omg/version.rb +1 -1
- data/lib/relaton_omg/xml_parser.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a3fa25520ee5306759f37d20b34898fd15338bcca3817989ecdbd237e6b1b41
|
4
|
+
data.tar.gz: 0a4b60e966d282a143e0a5b4ced089228f0e8bc29730b2eb981b89a795b8f679
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3b8ac6d1f2d426f9abd3fc5e3d55c161f96f2d8ae499f7645ea215de2e71558455f2715c2219acdc5fc44a1a0f876b5a6a87cd163a7c181de78f4b5f89113b8
|
7
|
+
data.tar.gz: 1d0f01a06e0e3b1d1f2dc4e0c8753b38b5b807be2fea8a266c726a2daf8d825026e290ed9baeed6a88985a70be42ab54df2d4af3037a426db83845bb4f2cba1c
|
data/lib/relaton_omg/version.rb
CHANGED
@@ -6,8 +6,12 @@ module RelatonOmg
|
|
6
6
|
def from_xml(xml)
|
7
7
|
doc = Nokogiri::XML(xml)
|
8
8
|
doc.remove_namespaces!
|
9
|
-
|
10
|
-
|
9
|
+
item = doc.at("/bibitem|/bibdata")
|
10
|
+
if item
|
11
|
+
RelatonOmg::OmgBibliographicItem.new(item_data(item))
|
12
|
+
else
|
13
|
+
warn "[relato-omg] can't find bibitem or bibdata element in the XML"
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
private
|