roxml 1.2 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/MIT-LICENSE +18 -0
  2. data/README.rdoc +126 -0
  3. data/Rakefile +100 -0
  4. data/lib/roxml.rb +479 -485
  5. data/lib/roxml/extensions/active_support.rb +32 -0
  6. data/lib/roxml/extensions/array.rb +5 -0
  7. data/lib/roxml/extensions/array/conversions.rb +25 -0
  8. data/lib/roxml/extensions/deprecation.rb +28 -0
  9. data/lib/roxml/extensions/string.rb +21 -0
  10. data/lib/roxml/extensions/string/conversions.rb +44 -0
  11. data/lib/roxml/extensions/string/iterators.rb +12 -0
  12. data/lib/roxml/options.rb +266 -0
  13. data/lib/roxml/xml.rb +223 -0
  14. data/lib/roxml/xml/libxml.rb +63 -0
  15. data/lib/roxml/xml/rexml.rb +64 -0
  16. data/roxml.gemspec +105 -0
  17. data/test/fixtures/book_text_with_attribute.xml +1 -1
  18. data/test/fixtures/book_valid.xml +2 -2
  19. data/test/fixtures/book_with_authors.xml +7 -0
  20. data/test/fixtures/book_with_contributors_attrs.xml +7 -0
  21. data/test/fixtures/book_with_default_namespace.xml +9 -0
  22. data/test/fixtures/book_with_depth.xml +6 -0
  23. data/test/fixtures/book_with_wrapped_attr.xml +3 -0
  24. data/test/fixtures/dictionary_of_attr_name_clashes.xml +8 -0
  25. data/test/fixtures/dictionary_of_attrs.xml +6 -0
  26. data/test/fixtures/dictionary_of_guarded_names.xml +6 -0
  27. data/test/fixtures/dictionary_of_mixeds.xml +4 -0
  28. data/test/fixtures/dictionary_of_name_clashes.xml +10 -0
  29. data/test/fixtures/dictionary_of_names.xml +4 -0
  30. data/test/fixtures/dictionary_of_texts.xml +10 -0
  31. data/test/fixtures/library.xml +1 -1
  32. data/test/fixtures/library_uppercase.xml +30 -0
  33. data/test/fixtures/muffins.xml +3 -0
  34. data/test/fixtures/nameless_ageless_youth.xml +2 -0
  35. data/test/fixtures/node_with_attr_name_conflicts.xml +1 -0
  36. data/test/fixtures/node_with_name_conflicts.xml +4 -0
  37. data/test/fixtures/numerology.xml +4 -0
  38. data/test/fixtures/person_with_guarded_mothers.xml +13 -0
  39. data/test/fixtures/person_with_mothers.xml +10 -0
  40. data/test/mocks/dictionaries.rb +56 -0
  41. data/test/mocks/mocks.rb +244 -48
  42. data/test/release/dependencies_test.rb +32 -0
  43. data/test/test_helper.rb +44 -0
  44. data/test/unit/inheritance_test.rb +19 -0
  45. data/test/unit/options_test.rb +102 -0
  46. data/test/unit/roxml_test.rb +24 -0
  47. data/test/unit/string_test.rb +11 -0
  48. data/test/unit/to_xml_test.rb +52 -0
  49. data/test/unit/xml_attribute_test.rb +39 -0
  50. data/test/unit/xml_block_test.rb +81 -0
  51. data/test/unit/xml_bool_test.rb +105 -0
  52. data/test/unit/xml_construct_test.rb +77 -0
  53. data/test/unit/xml_hash_test.rb +65 -0
  54. data/test/unit/xml_initialize_test.rb +50 -0
  55. data/test/unit/xml_name_test.rb +108 -0
  56. data/test/unit/xml_namespace_test.rb +38 -0
  57. data/test/unit/xml_object_test.rb +116 -0
  58. data/test/unit/xml_required_test.rb +93 -0
  59. data/test/unit/xml_text_test.rb +68 -0
  60. metadata +138 -87
  61. data/MIT-LICENSE.txt +0 -9
  62. data/README +0 -2
  63. data/doc/classes/ROXML.html +0 -374
  64. data/doc/classes/ROXML.src/M000003.html +0 -19
  65. data/doc/classes/ROXML.src/M000004.html +0 -25
  66. data/doc/classes/ROXML.src/M000005.html +0 -22
  67. data/doc/classes/ROXML/ROXML_Class.html +0 -429
  68. data/doc/classes/ROXML/ROXML_Class.src/M000006.html +0 -27
  69. data/doc/classes/ROXML/ROXML_Class.src/M000007.html +0 -18
  70. data/doc/classes/ROXML/ROXML_Class.src/M000008.html +0 -19
  71. data/doc/classes/ROXML/ROXML_Class.src/M000009.html +0 -25
  72. data/doc/classes/ROXML/ROXML_Class.src/M000010.html +0 -24
  73. data/doc/classes/ROXML/ROXML_Class.src/M000011.html +0 -18
  74. data/doc/classes/ROXML/ROXML_Class.src/M000012.html +0 -18
  75. data/doc/classes/ROXML/XMLAttributeRef.html +0 -175
  76. data/doc/classes/ROXML/XMLAttributeRef.src/M000015.html +0 -19
  77. data/doc/classes/ROXML/XMLAttributeRef.src/M000016.html +0 -19
  78. data/doc/classes/ROXML/XMLObjectRef.html +0 -175
  79. data/doc/classes/ROXML/XMLObjectRef.src/M000013.html +0 -26
  80. data/doc/classes/ROXML/XMLObjectRef.src/M000014.html +0 -32
  81. data/doc/classes/ROXML/XMLRef.html +0 -166
  82. data/doc/classes/ROXML/XMLRef.src/M000017.html +0 -21
  83. data/doc/classes/ROXML/XMLTextRef.html +0 -198
  84. data/doc/classes/ROXML/XMLTextRef.src/M000018.html +0 -28
  85. data/doc/classes/ROXML/XMLTextRef.src/M000019.html +0 -34
  86. data/doc/classes/String.html +0 -165
  87. data/doc/classes/String.src/M000001.html +0 -23
  88. data/doc/classes/String.src/M000002.html +0 -23
  89. data/doc/created.rid +0 -1
  90. data/doc/files/lib/roxml_rb.html +0 -234
  91. data/doc/fr_class_index.html +0 -33
  92. data/doc/fr_file_index.html +0 -27
  93. data/doc/fr_method_index.html +0 -45
  94. data/doc/index.html +0 -24
  95. data/doc/rdoc-style.css +0 -208
  96. data/test/fixture_helper.rb +0 -5
  97. data/test/test_roxml.rb +0 -105
@@ -1,27 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>parse (ROXML::ROXML_Class)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 248</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">data</span>)
15
-
16
- <span class="ruby-identifier">xml</span> = (<span class="ruby-identifier">data</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Element</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">data</span> <span class="ruby-operator">:</span> <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">data</span>).<span class="ruby-identifier">root</span>)
17
-
18
- <span class="ruby-identifier">inst</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">allocate</span>
19
-
20
- <span class="ruby-identifier">tag_refs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ref</span><span class="ruby-operator">|</span>
21
- <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">populate</span>(<span class="ruby-identifier">xml</span>, <span class="ruby-identifier">inst</span>)
22
- <span class="ruby-keyword kw">end</span>
23
-
24
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">inst</span>
25
- <span class="ruby-keyword kw">end</span></pre>
26
- </body>
27
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>xml_name (ROXML::ROXML_Class)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 271</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_name</span>(<span class="ruby-identifier">name</span>)
15
- <span class="ruby-ivar">@tag_name</span> = <span class="ruby-identifier">name</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>xml_attribute (ROXML::ROXML_Class)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 292</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_attribute</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span> = <span class="ruby-value">0</span>)
15
- <span class="ruby-identifier">add_ref</span>(<span class="ruby-constant">XMLAttributeRef</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">name</span>))
16
- <span class="ruby-identifier">add_accessor</span>(<span class="ruby-identifier">sym</span>, (<span class="ruby-constant">TAG_READONLY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">TAG_READONLY</span>))
17
- <span class="ruby-keyword kw">end</span></pre>
18
- </body>
19
- </html>
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>xml_text (ROXML::ROXML_Class)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 323</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_text</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span> = <span class="ruby-constant">TAG_DEFAULT</span>, <span class="ruby-identifier">wrapper</span> = <span class="ruby-keyword kw">nil</span>)
15
- <span class="ruby-identifier">ref</span> = <span class="ruby-constant">XMLTextRef</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">text_content</span> = (<span class="ruby-constant">TEXT_CONTENT</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span><span class="ruby-operator">==</span><span class="ruby-constant">TEXT_CONTENT</span>)
17
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">cdata</span> = (<span class="ruby-constant">TAG_CDATA</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span><span class="ruby-operator">==</span><span class="ruby-constant">TAG_CDATA</span>)
18
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">array</span> = (<span class="ruby-constant">TAG_ARRAY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span><span class="ruby-operator">==</span><span class="ruby-constant">TAG_ARRAY</span>)
19
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">wrapper</span> = <span class="ruby-identifier">wrapper</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">wrapper</span>
20
- <span class="ruby-keyword kw">end</span>
21
- <span class="ruby-identifier">add_ref</span>(<span class="ruby-identifier">ref</span>)
22
- <span class="ruby-identifier">add_accessor</span>(<span class="ruby-identifier">sym</span>, (<span class="ruby-constant">TAG_READONLY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">TAG_READONLY</span>), <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">array</span>)
23
- <span class="ruby-keyword kw">end</span></pre>
24
- </body>
25
- </html>
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>xml_object (ROXML::ROXML_Class)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 382</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_object</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">klass</span>, <span class="ruby-identifier">options</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">wrapper</span> = <span class="ruby-keyword kw">nil</span>)
15
- <span class="ruby-identifier">ref</span> = <span class="ruby-constant">XMLObjectRef</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">array</span> = (<span class="ruby-constant">TAG_ARRAY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">==</span> <span class="ruby-constant">TAG_ARRAY</span>)
17
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">wrapper</span> = <span class="ruby-identifier">wrapper</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">wrapper</span>
18
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">klass</span> = <span class="ruby-identifier">klass</span>
19
- <span class="ruby-keyword kw">end</span>
20
- <span class="ruby-identifier">add_ref</span>(<span class="ruby-identifier">ref</span>)
21
- <span class="ruby-identifier">add_accessor</span>(<span class="ruby-identifier">sym</span>, (<span class="ruby-constant">TAG_READONLY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">TAG_READONLY</span>), <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">array</span>)
22
- <span class="ruby-keyword kw">end</span></pre>
23
- </body>
24
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>tag_name (ROXML::ROXML_Class)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 395</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag_name</span>
15
- <span class="ruby-ivar">@tag_name</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'::'</span>).<span class="ruby-identifier">last</span>.<span class="ruby-identifier">downcase</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>tag_refs (ROXML::ROXML_Class)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 401</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag_refs</span>
15
- <span class="ruby-ivar">@xml_refs</span> <span class="ruby-operator">||</span> []
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,175 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: ROXML::XMLAttributeRef</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">ROXML::XMLAttributeRef</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/roxml_rb.html">
59
- lib/roxml.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="XMLRef.html">
69
- XMLRef
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <p>
85
- Interal class representing an XML attribute binding
86
- </p>
87
- <p>
88
- In context:
89
- </p>
90
- <pre>
91
- &lt;element attribute=&quot;XMLAttributeRef&quot;&gt;
92
- XMLTextRef
93
- &lt;/element&gt;
94
- </pre>
95
-
96
- </div>
97
-
98
-
99
- </div>
100
-
101
- <div id="method-list">
102
- <h3 class="section-bar">Methods</h3>
103
-
104
- <div class="name-list">
105
- <a href="#M000016">populate</a>&nbsp;&nbsp;
106
- <a href="#M000015">update_xml</a>&nbsp;&nbsp;
107
- </div>
108
- </div>
109
-
110
- </div>
111
-
112
-
113
- <!-- if includes -->
114
-
115
- <div id="section">
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
- <!-- if method_list -->
125
- <div id="methods">
126
- <h3 class="section-bar">Public Instance methods</h3>
127
-
128
- <div id="method-M000016" class="method-detail">
129
- <a name="M000016"></a>
130
-
131
- <div class="method-heading">
132
- <a href="XMLAttributeRef.src/M000016.html" target="Code" class="method-signature"
133
- onclick="popupCode('XMLAttributeRef.src/M000016.html');return false;">
134
- <span class="method-name">populate</span><span class="method-args">(xml, instance)</span>
135
- </a>
136
- </div>
137
-
138
- <div class="method-description">
139
- <p>
140
- Reads data from the XML element and populates the object instance
141
- accordingly.
142
- </p>
143
- </div>
144
- </div>
145
-
146
- <div id="method-M000015" class="method-detail">
147
- <a name="M000015"></a>
148
-
149
- <div class="method-heading">
150
- <a href="XMLAttributeRef.src/M000015.html" target="Code" class="method-signature"
151
- onclick="popupCode('XMLAttributeRef.src/M000015.html');return false;">
152
- <span class="method-name">update_xml</span><span class="method-args">(xml, value)</span>
153
- </a>
154
- </div>
155
-
156
- <div class="method-description">
157
- <p>
158
- Updates the attribute in the given XML block to the value provided.
159
- </p>
160
- </div>
161
- </div>
162
-
163
-
164
- </div>
165
-
166
-
167
- </div>
168
-
169
-
170
- <div id="validator-badges">
171
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
172
- </div>
173
-
174
- </body>
175
- </html>
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>update_xml (ROXML::XMLAttributeRef)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 129</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_xml</span>(<span class="ruby-identifier">xml</span>, <span class="ruby-identifier">value</span>)
15
- <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_utf</span>
16
- <span class="ruby-identifier">xml</span>
17
- <span class="ruby-keyword kw">end</span></pre>
18
- </body>
19
- </html>
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>populate (ROXML::XMLAttributeRef)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 136</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">populate</span>(<span class="ruby-identifier">xml</span>, <span class="ruby-identifier">instance</span>)
15
- <span class="ruby-identifier">instance</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{accessor}&quot;</span>, <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">name</span>])
16
- <span class="ruby-identifier">instance</span>
17
- <span class="ruby-keyword kw">end</span></pre>
18
- </body>
19
- </html>
@@ -1,175 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: ROXML::XMLObjectRef</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">ROXML::XMLObjectRef</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/roxml_rb.html">
59
- lib/roxml.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="XMLTextRef.html">
69
- XMLTextRef
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000014">populate</a>&nbsp;&nbsp;
92
- <a href="#M000013">update_xml</a>&nbsp;&nbsp;
93
- </div>
94
- </div>
95
-
96
- </div>
97
-
98
-
99
- <!-- if includes -->
100
-
101
- <div id="section">
102
-
103
-
104
-
105
-
106
-
107
- <div id="attribute-list">
108
- <h3 class="section-bar">Attributes</h3>
109
-
110
- <div class="name-list">
111
- <table>
112
- <tr class="top-aligned-row context-row">
113
- <td class="context-item-name">klass</td>
114
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
115
- <td class="context-item-desc"></td>
116
- </tr>
117
- </table>
118
- </div>
119
- </div>
120
-
121
-
122
-
123
- <!-- if method_list -->
124
- <div id="methods">
125
- <h3 class="section-bar">Public Instance methods</h3>
126
-
127
- <div id="method-M000014" class="method-detail">
128
- <a name="M000014"></a>
129
-
130
- <div class="method-heading">
131
- <a href="XMLObjectRef.src/M000014.html" target="Code" class="method-signature"
132
- onclick="popupCode('XMLObjectRef.src/M000014.html');return false;">
133
- <span class="method-name">populate</span><span class="method-args">(xml, instance)</span>
134
- </a>
135
- </div>
136
-
137
- <div class="method-description">
138
- <p>
139
- Reads data from the XML element and populates the references XML object
140
- accordingly.
141
- </p>
142
- </div>
143
- </div>
144
-
145
- <div id="method-M000013" class="method-detail">
146
- <a name="M000013"></a>
147
-
148
- <div class="method-heading">
149
- <a href="XMLObjectRef.src/M000013.html" target="Code" class="method-signature"
150
- onclick="popupCode('XMLObjectRef.src/M000013.html');return false;">
151
- <span class="method-name">update_xml</span><span class="method-args">(xml, value)</span>
152
- </a>
153
- </div>
154
-
155
- <div class="method-description">
156
- <p>
157
- Updates the composed XML object in the given XML block to the value
158
- provided.
159
- </p>
160
- </div>
161
- </div>
162
-
163
-
164
- </div>
165
-
166
-
167
- </div>
168
-
169
-
170
- <div id="validator-badges">
171
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
172
- </div>
173
-
174
- </body>
175
- </html>