xml-simple 1.0.14 → 1.0.15

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.
Files changed (2) hide show
  1. data/lib/xmlsimple.rb +8 -5
  2. metadata +3 -3
@@ -1,7 +1,7 @@
1
1
  # = XmlSimple
2
2
  #
3
3
  # Author:: Maik Schmidt <contact@maik-schmidt.de>
4
- # Copyright:: Copyright (c) 2003-2009 Maik Schmidt
4
+ # Copyright:: Copyright (c) 2003-2011 Maik Schmidt
5
5
  # License:: Distributes under the same terms as Ruby.
6
6
  #
7
7
  require 'rexml/document'
@@ -11,7 +11,7 @@ require 'stringio'
11
11
  class XmlSimple
12
12
  include REXML
13
13
 
14
- @@VERSION = '1.0.13'
14
+ @@VERSION = '1.0.15'
15
15
 
16
16
  # A simple cache for XML documents that were already transformed
17
17
  # by xml_in.
@@ -800,9 +800,12 @@ class XmlSimple
800
800
  end
801
801
 
802
802
  # Check for the '@' attribute prefix to allow separation of attributes and elements
803
- if @options['noattr'] ||
804
- (@options['attrprefix'] && !(key =~ /^@(.*)/)) ||
805
- !scalar(value)
803
+
804
+ if (@options['noattr'] ||
805
+ (@options['attrprefix'] && !(key =~ /^@(.*)/)) ||
806
+ !scalar(value)
807
+ ) &&
808
+ key != @options['contentkey']
806
809
  nested << value_to_xml(value, key, indent + @options['indent'])
807
810
  else
808
811
  value = value.to_s
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 14
9
- version: 1.0.14
8
+ - 15
9
+ version: 1.0.15
10
10
  platform: ruby
11
11
  authors:
12
12
  - Maik Schmidt
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-27 00:00:00 +01:00
17
+ date: 2011-03-24 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies: []
20
20