dreamcat4-libxml-bindings 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/README.rdoc +58 -20
  2. data/Rakefile +8 -3
  3. data/VERSION.yml +2 -2
  4. data/lib/libxml_bindings.rb +212 -71
  5. data/test/test_helper.rb +29 -0
  6. data/test/test_libxml_bindings.rb +38 -0
  7. data/test/test_xml_modifiers.rb +57 -0
  8. data/test/test_xml_outputters.rb +53 -0
  9. data/test/test_xml_readers.rb +59 -0
  10. data/test/xml/atom.xml +13 -0
  11. data/test/xml/books.xml +146 -0
  12. data/test/xml/breakfast_menu.xml +38 -0
  13. data/test/xml/document.xml +49 -0
  14. data/test/xml/merge_bug_data.xml +58 -0
  15. data/test/xml/namespaces.xml +22 -0
  16. data/test/xml/parts_system.xml +31 -0
  17. data/test/xml/plant_catalog.xml +336 -0
  18. data/test/xml/recipie.xml +18 -0
  19. data/test/xml/rss1.xml +58 -0
  20. data/test/xml/rss2.xml +56 -0
  21. data/test/xml/ruby_lang.xhtml +238 -0
  22. data/test/xml/rubynet.xml +79 -0
  23. data/test/xml/shiporder.xls +86 -0
  24. data/test/xml/shiporder.xml +23 -0
  25. data/test/xml/shiporder.xsd +31 -0
  26. data/test/xml/soap_create_path.xml +15 -0
  27. data/test/xml/soap_create_path_response.xml +16 -0
  28. data/test/xml/soap_create_reservation.xml +25 -0
  29. data/test/xml/soap_create_reservation_response.xml +64 -0
  30. data/test/xml/soap_get_price.xml +11 -0
  31. data/test/xml/soap_get_price_response.xml +11 -0
  32. data/test/xml/soap_manufacturer_names_response.xml +27 -0
  33. data/test/xml/soap_order_item.xml +17 -0
  34. data/test/xml/soap_order_item_response.xml +10 -0
  35. data/test/xml/soap_refresh_path.xml +15 -0
  36. data/test/xml/soap_refresh_path_response.xml +16 -0
  37. data/test/xml/soap_teardown_path.xml +15 -0
  38. data/test/xml/soap_teardown_path_response.xml +16 -0
  39. metadata +53 -9
  40. data/test/libxml_bindings_test.rb +0 -7
@@ -0,0 +1,336 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?>
2
+ <!-- http://www.w3schools.com/XML/xml_examples.asp -->
3
+ <CATALOG>
4
+ <PLANT>
5
+ <COMMON>Bloodroot</COMMON>
6
+ <BOTANICAL>Sanguinaria canadensis</BOTANICAL>
7
+ <ZONE>4</ZONE>
8
+ <LIGHT>Mostly Shady</LIGHT>
9
+
10
+ <PRICE>$2.44</PRICE>
11
+ <AVAILABILITY>031599</AVAILABILITY>
12
+ </PLANT>
13
+ <PLANT>
14
+ <COMMON>Columbine</COMMON>
15
+ <BOTANICAL>Aquilegia canadensis</BOTANICAL>
16
+ <ZONE>3</ZONE>
17
+
18
+ <LIGHT>Mostly Shady</LIGHT>
19
+ <PRICE>$9.37</PRICE>
20
+ <AVAILABILITY>030699</AVAILABILITY>
21
+ </PLANT>
22
+ <PLANT>
23
+ <COMMON>Marsh Marigold</COMMON>
24
+ <BOTANICAL>Caltha palustris</BOTANICAL>
25
+
26
+ <ZONE>4</ZONE>
27
+ <LIGHT>Mostly Sunny</LIGHT>
28
+ <PRICE>$6.81</PRICE>
29
+ <AVAILABILITY>051799</AVAILABILITY>
30
+ </PLANT>
31
+ <PLANT>
32
+ <COMMON>Cowslip</COMMON>
33
+
34
+ <BOTANICAL>Caltha palustris</BOTANICAL>
35
+ <ZONE>4</ZONE>
36
+ <LIGHT>Mostly Shady</LIGHT>
37
+ <PRICE>$9.90</PRICE>
38
+ <AVAILABILITY>030699</AVAILABILITY>
39
+ </PLANT>
40
+
41
+ <PLANT>
42
+ <COMMON>Dutchman's-Breeches</COMMON>
43
+ <BOTANICAL>Dicentra cucullaria</BOTANICAL>
44
+ <ZONE>3</ZONE>
45
+ <LIGHT>Mostly Shady</LIGHT>
46
+ <PRICE>$6.44</PRICE>
47
+
48
+ <AVAILABILITY>012099</AVAILABILITY>
49
+ </PLANT>
50
+ <PLANT>
51
+ <COMMON>Ginger, Wild</COMMON>
52
+ <BOTANICAL>Asarum canadense</BOTANICAL>
53
+ <ZONE>3</ZONE>
54
+ <LIGHT>Mostly Shady</LIGHT>
55
+
56
+ <PRICE>$9.03</PRICE>
57
+ <AVAILABILITY>041899</AVAILABILITY>
58
+ </PLANT>
59
+ <PLANT>
60
+ <COMMON>Hepatica</COMMON>
61
+ <BOTANICAL>Hepatica americana</BOTANICAL>
62
+ <ZONE>4</ZONE>
63
+
64
+ <LIGHT>Mostly Shady</LIGHT>
65
+ <PRICE>$4.45</PRICE>
66
+ <AVAILABILITY>012699</AVAILABILITY>
67
+ </PLANT>
68
+ <PLANT>
69
+ <COMMON>Liverleaf</COMMON>
70
+ <BOTANICAL>Hepatica americana</BOTANICAL>
71
+
72
+ <ZONE>4</ZONE>
73
+ <LIGHT>Mostly Shady</LIGHT>
74
+ <PRICE>$3.99</PRICE>
75
+ <AVAILABILITY>010299</AVAILABILITY>
76
+ </PLANT>
77
+ <PLANT>
78
+ <COMMON>Jack-In-The-Pulpit</COMMON>
79
+
80
+ <BOTANICAL>Arisaema triphyllum</BOTANICAL>
81
+ <ZONE>4</ZONE>
82
+ <LIGHT>Mostly Shady</LIGHT>
83
+ <PRICE>$3.23</PRICE>
84
+ <AVAILABILITY>020199</AVAILABILITY>
85
+ </PLANT>
86
+
87
+ <PLANT>
88
+ <COMMON>Mayapple</COMMON>
89
+ <BOTANICAL>Podophyllum peltatum</BOTANICAL>
90
+ <ZONE>3</ZONE>
91
+ <LIGHT>Mostly Shady</LIGHT>
92
+ <PRICE>$2.98</PRICE>
93
+
94
+ <AVAILABILITY>060599</AVAILABILITY>
95
+ </PLANT>
96
+ <PLANT>
97
+ <COMMON>Phlox, Woodland</COMMON>
98
+ <BOTANICAL>Phlox divaricata</BOTANICAL>
99
+ <ZONE>3</ZONE>
100
+ <LIGHT>Sun or Shade</LIGHT>
101
+
102
+ <PRICE>$2.80</PRICE>
103
+ <AVAILABILITY>012299</AVAILABILITY>
104
+ </PLANT>
105
+ <PLANT>
106
+ <COMMON>Phlox, Blue</COMMON>
107
+ <BOTANICAL>Phlox divaricata</BOTANICAL>
108
+ <ZONE>3</ZONE>
109
+
110
+ <LIGHT>Sun or Shade</LIGHT>
111
+ <PRICE>$5.59</PRICE>
112
+ <AVAILABILITY>021699</AVAILABILITY>
113
+ </PLANT>
114
+ <PLANT>
115
+ <COMMON>Spring-Beauty</COMMON>
116
+ <BOTANICAL>Claytonia Virginica</BOTANICAL>
117
+
118
+ <ZONE>7</ZONE>
119
+ <LIGHT>Mostly Shady</LIGHT>
120
+ <PRICE>$6.59</PRICE>
121
+ <AVAILABILITY>020199</AVAILABILITY>
122
+ </PLANT>
123
+ <PLANT>
124
+ <COMMON>Trillium</COMMON>
125
+
126
+ <BOTANICAL>Trillium grandiflorum</BOTANICAL>
127
+ <ZONE>5</ZONE>
128
+ <LIGHT>Sun or Shade</LIGHT>
129
+ <PRICE>$3.90</PRICE>
130
+ <AVAILABILITY>042999</AVAILABILITY>
131
+ </PLANT>
132
+
133
+ <PLANT>
134
+ <COMMON>Wake Robin</COMMON>
135
+ <BOTANICAL>Trillium grandiflorum</BOTANICAL>
136
+ <ZONE>5</ZONE>
137
+ <LIGHT>Sun or Shade</LIGHT>
138
+ <PRICE>$3.20</PRICE>
139
+
140
+ <AVAILABILITY>022199</AVAILABILITY>
141
+ </PLANT>
142
+ <PLANT>
143
+ <COMMON>Violet, Dog-Tooth</COMMON>
144
+ <BOTANICAL>Erythronium americanum</BOTANICAL>
145
+ <ZONE>4</ZONE>
146
+ <LIGHT>Shade</LIGHT>
147
+
148
+ <PRICE>$9.04</PRICE>
149
+ <AVAILABILITY>020199</AVAILABILITY>
150
+ </PLANT>
151
+ <PLANT>
152
+ <COMMON>Trout Lily</COMMON>
153
+ <BOTANICAL>Erythronium americanum</BOTANICAL>
154
+ <ZONE>4</ZONE>
155
+
156
+ <LIGHT>Shade</LIGHT>
157
+ <PRICE>$6.94</PRICE>
158
+ <AVAILABILITY>032499</AVAILABILITY>
159
+ </PLANT>
160
+ <PLANT>
161
+ <COMMON>Adder's-Tongue</COMMON>
162
+ <BOTANICAL>Erythronium americanum</BOTANICAL>
163
+
164
+ <ZONE>4</ZONE>
165
+ <LIGHT>Shade</LIGHT>
166
+ <PRICE>$9.58</PRICE>
167
+ <AVAILABILITY>041399</AVAILABILITY>
168
+ </PLANT>
169
+ <PLANT>
170
+ <COMMON>Anemone</COMMON>
171
+
172
+ <BOTANICAL>Anemone blanda</BOTANICAL>
173
+ <ZONE>6</ZONE>
174
+ <LIGHT>Mostly Shady</LIGHT>
175
+ <PRICE>$8.86</PRICE>
176
+ <AVAILABILITY>122698</AVAILABILITY>
177
+ </PLANT>
178
+
179
+ <PLANT>
180
+ <COMMON>Grecian Windflower</COMMON>
181
+ <BOTANICAL>Anemone blanda</BOTANICAL>
182
+ <ZONE>6</ZONE>
183
+ <LIGHT>Mostly Shady</LIGHT>
184
+ <PRICE>$9.16</PRICE>
185
+
186
+ <AVAILABILITY>071099</AVAILABILITY>
187
+ </PLANT>
188
+ <PLANT>
189
+ <COMMON>Bee Balm</COMMON>
190
+ <BOTANICAL>Monarda didyma</BOTANICAL>
191
+ <ZONE>4</ZONE>
192
+ <LIGHT>Shade</LIGHT>
193
+
194
+ <PRICE>$4.59</PRICE>
195
+ <AVAILABILITY>050399</AVAILABILITY>
196
+ </PLANT>
197
+ <PLANT>
198
+ <COMMON>Bergamot</COMMON>
199
+ <BOTANICAL>Monarda didyma</BOTANICAL>
200
+ <ZONE>4</ZONE>
201
+
202
+ <LIGHT>Shade</LIGHT>
203
+ <PRICE>$7.16</PRICE>
204
+ <AVAILABILITY>042799</AVAILABILITY>
205
+ </PLANT>
206
+ <PLANT>
207
+ <COMMON>Black-Eyed Susan</COMMON>
208
+ <BOTANICAL>Rudbeckia hirta</BOTANICAL>
209
+
210
+ <ZONE>Annual</ZONE>
211
+ <LIGHT>Sunny</LIGHT>
212
+ <PRICE>$9.80</PRICE>
213
+ <AVAILABILITY>061899</AVAILABILITY>
214
+ </PLANT>
215
+ <PLANT>
216
+ <COMMON>Buttercup</COMMON>
217
+
218
+ <BOTANICAL>Ranunculus</BOTANICAL>
219
+ <ZONE>4</ZONE>
220
+ <LIGHT>Shade</LIGHT>
221
+ <PRICE>$2.57</PRICE>
222
+ <AVAILABILITY>061099</AVAILABILITY>
223
+ </PLANT>
224
+
225
+ <PLANT>
226
+ <COMMON>Crowfoot</COMMON>
227
+ <BOTANICAL>Ranunculus</BOTANICAL>
228
+ <ZONE>4</ZONE>
229
+ <LIGHT>Shade</LIGHT>
230
+ <PRICE>$9.34</PRICE>
231
+
232
+ <AVAILABILITY>040399</AVAILABILITY>
233
+ </PLANT>
234
+ <PLANT>
235
+ <COMMON>Butterfly Weed</COMMON>
236
+ <BOTANICAL>Asclepias tuberosa</BOTANICAL>
237
+ <ZONE>Annual</ZONE>
238
+ <LIGHT>Sunny</LIGHT>
239
+
240
+ <PRICE>$2.78</PRICE>
241
+ <AVAILABILITY>063099</AVAILABILITY>
242
+ </PLANT>
243
+ <PLANT>
244
+ <COMMON>Cinquefoil</COMMON>
245
+ <BOTANICAL>Potentilla</BOTANICAL>
246
+ <ZONE>Annual</ZONE>
247
+
248
+ <LIGHT>Shade</LIGHT>
249
+ <PRICE>$7.06</PRICE>
250
+ <AVAILABILITY>052599</AVAILABILITY>
251
+ </PLANT>
252
+ <PLANT>
253
+ <COMMON>Primrose</COMMON>
254
+ <BOTANICAL>Oenothera</BOTANICAL>
255
+
256
+ <ZONE>3 - 5</ZONE>
257
+ <LIGHT>Sunny</LIGHT>
258
+ <PRICE>$6.56</PRICE>
259
+ <AVAILABILITY>013099</AVAILABILITY>
260
+ </PLANT>
261
+ <PLANT>
262
+ <COMMON>Gentian</COMMON>
263
+
264
+ <BOTANICAL>Gentiana</BOTANICAL>
265
+ <ZONE>4</ZONE>
266
+ <LIGHT>Sun or Shade</LIGHT>
267
+ <PRICE>$7.81</PRICE>
268
+ <AVAILABILITY>051899</AVAILABILITY>
269
+ </PLANT>
270
+
271
+ <PLANT>
272
+ <COMMON>Blue Gentian</COMMON>
273
+ <BOTANICAL>Gentiana</BOTANICAL>
274
+ <ZONE>4</ZONE>
275
+ <LIGHT>Sun or Shade</LIGHT>
276
+ <PRICE>$8.56</PRICE>
277
+
278
+ <AVAILABILITY>050299</AVAILABILITY>
279
+ </PLANT>
280
+ <PLANT>
281
+ <COMMON>Jacob's Ladder</COMMON>
282
+ <BOTANICAL>Polemonium caeruleum</BOTANICAL>
283
+ <ZONE>Annual</ZONE>
284
+ <LIGHT>Shade</LIGHT>
285
+
286
+ <PRICE>$9.26</PRICE>
287
+ <AVAILABILITY>022199</AVAILABILITY>
288
+ </PLANT>
289
+ <PLANT>
290
+ <COMMON>Greek Valerian</COMMON>
291
+ <BOTANICAL>Polemonium caeruleum</BOTANICAL>
292
+ <ZONE>Annual</ZONE>
293
+
294
+ <LIGHT>Shade</LIGHT>
295
+ <PRICE>$4.36</PRICE>
296
+ <AVAILABILITY>071499</AVAILABILITY>
297
+ </PLANT>
298
+ <PLANT>
299
+ <COMMON>California Poppy</COMMON>
300
+ <BOTANICAL>Eschscholzia californica</BOTANICAL>
301
+
302
+ <ZONE>Annual</ZONE>
303
+ <LIGHT>Sun</LIGHT>
304
+ <PRICE>$7.89</PRICE>
305
+ <AVAILABILITY>032799</AVAILABILITY>
306
+ </PLANT>
307
+ <PLANT>
308
+ <COMMON>Shooting Star</COMMON>
309
+
310
+ <BOTANICAL>Dodecatheon</BOTANICAL>
311
+ <ZONE>Annual</ZONE>
312
+ <LIGHT>Mostly Shady</LIGHT>
313
+ <PRICE>$8.60</PRICE>
314
+ <AVAILABILITY>051399</AVAILABILITY>
315
+ </PLANT>
316
+
317
+ <PLANT>
318
+ <COMMON>Snakeroot</COMMON>
319
+ <BOTANICAL>Cimicifuga</BOTANICAL>
320
+ <ZONE>Annual</ZONE>
321
+ <LIGHT>Shade</LIGHT>
322
+ <PRICE>$5.63</PRICE>
323
+
324
+ <AVAILABILITY>071199</AVAILABILITY>
325
+ </PLANT>
326
+ <PLANT>
327
+ <COMMON>Cardinal Flower</COMMON>
328
+ <BOTANICAL>Lobelia cardinalis</BOTANICAL>
329
+ <ZONE>2</ZONE>
330
+ <LIGHT>Shade</LIGHT>
331
+
332
+ <PRICE>$3.02</PRICE>
333
+ <AVAILABILITY>022299</AVAILABILITY>
334
+ </PLANT>
335
+ </CATALOG>
336
+
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0"?>
2
+ <!-- http://en.wikipedia.org/wiki/XML -->
3
+ <recipe name="bread" prep_time="5 mins" cook_time="3 hours">
4
+ <title>Basic bread</title>
5
+ <ingredient amount="8" unit="dL">Flour</ingredient>
6
+ <ingredient amount="10" unit="grams">Yeast</ingredient>
7
+ <ingredient amount="4" unit="dL" state="warm">Water</ingredient>
8
+ <ingredient amount="1" unit="teaspoon">Salt</ingredient>
9
+ <instructions>
10
+ <step>Mix all ingredients together.</step>
11
+ <step>Knead thoroughly.</step>
12
+ <step>Cover with a cloth, and leave for one hour in warm room.</step>
13
+ <step>Knead again.</step>
14
+ <step>Place in a bread baking tin.</step>
15
+ <step>Cover with a cloth, and leave for one hour in warm room.</step>
16
+ <step>Bake in the oven at 180(degrees)C for 30 minutes.</step>
17
+ </instructions>
18
+ </recipe>
data/test/xml/rss1.xml ADDED
@@ -0,0 +1,58 @@
1
+ <?xml version="1.0"?>
2
+ <!-- http://en.wikipedia.org/wiki/RSS -->
3
+
4
+ <rdf:RDF
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns="http://purl.org/rss/1.0/">
7
+
8
+ <channel rdf:about="http://www.xml.com/xml/news.rss">
9
+ <title>XML.com</title>
10
+ <link>http://xml.com/pub</link>
11
+ <description>
12
+ XML.com features a rich mix of information and services
13
+ for the XML community.
14
+ </description>
15
+ <image rdf:resource="http://xml.com/universal/images/xml_tiny.gif" />
16
+
17
+ <items>
18
+ <rdf:Seq>
19
+ <rdf:li rdf:resource="http://xml.com/pub/2000/08/09/xslt/xslt.html" />
20
+ <rdf:li rdf:resource="http://xml.com/pub/2000/08/09/rdfdb/index.html" />
21
+ </rdf:Seq>
22
+ </items>
23
+ <textinput rdf:resource="http://search.xml.com" />
24
+ </channel>
25
+
26
+ <image rdf:about="http://xml.com/universal/images/xml_tiny.gif">
27
+ <title>XML.com</title>
28
+ <link>http://www.xml.com</link>
29
+ <url>http://xml.com/universal/images/xml_tiny.gif</url>
30
+ </image>
31
+
32
+ <item rdf:about="http://xml.com/pub/2000/08/09/xslt/xslt.html">
33
+ <title>Processing Inclusions with XSLT</title>
34
+ <link>http://xml.com/pub/2000/08/09/xslt/xslt.html</link>
35
+ <description>
36
+ Processing document inclusions with general XML tools can be
37
+ problematic. This article proposes a way of preserving inclusion
38
+ information through SAX-based processing.
39
+ </description>
40
+ </item>
41
+
42
+ <item rdf:about="http://xml.com/pub/2000/08/09/rdfdb/index.html">
43
+ <title>Putting RDF to Work</title>
44
+ <link>http://xml.com/pub/2000/08/09/rdfdb/index.html</link>
45
+ <description>
46
+ Tool and API support for the Resource Description Framework
47
+ is slowly coming of age. Edd Dumbill takes a look at RDFDB,
48
+ one of the most exciting new RDF toolkits.
49
+ </description>
50
+ </item>
51
+
52
+ <textinput rdf:about="http://search.xml.com">
53
+ <title>Search XML.com</title>
54
+ <description>Search XML.com's XML collection</description>
55
+ <name>s</name>
56
+ <link>http://search.xml.com</link>
57
+ </textinput>
58
+ </rdf:RDF>
data/test/xml/rss2.xml ADDED
@@ -0,0 +1,56 @@
1
+ <?xml version="1.0"?>
2
+ <!-- http://en.wikipedia.org/wiki/RSS -->
3
+ <rss version="2.0">
4
+ <channel>
5
+ <title>Lift Off News</title>
6
+ <link>http://liftoff.msfc.nasa.gov/</link>
7
+ <description>Liftoff to Space Exploration.</description>
8
+ <language>en-us</language>
9
+ <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
10
+ <lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
11
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
12
+ <generator>Weblog Editor 2.0</generator>
13
+ <managingEditor>editor@example.com</managingEditor>
14
+ <webMaster>webmaster@example.com</webMaster>
15
+ <ttl>5</ttl>
16
+
17
+ <item>
18
+ <title>Star City</title>
19
+ <link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
20
+ <description>How do Americans get ready to work with Russians aboard the
21
+ International Space Station? They take a crash course in culture, language
22
+ and protocol at Russia's Star City.</description>
23
+ <pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
24
+ <guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
25
+ </item>
26
+
27
+ <item>
28
+ <title>Space Exploration</title>
29
+ <link>http://liftoff.msfc.nasa.gov/</link>
30
+ <description>Sky watchers in Europe, Asia, and parts of Alaska and Canada
31
+ will experience a partial eclipse of the Sun on Saturday, May 31.</description>
32
+ <pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>
33
+ <guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>
34
+ </item>
35
+
36
+ <item>
37
+ <title>The Engine That Does More</title>
38
+ <link>http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp</link>
39
+ <description>Before man travels to Mars, NASA hopes to design new engines
40
+ that will let us fly through the Solar System more quickly. The proposed
41
+ VASIMR engine would do that.</description>
42
+ <pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>
43
+ <guid>http://liftoff.msfc.nasa.gov/2003/05/27.html#item571</guid>
44
+ </item>
45
+
46
+ <item>
47
+ <title>Astronauts' Dirty Laundry</title>
48
+ <link>http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp</link>
49
+ <description>Compared to earlier spacecraft, the International Space
50
+ Station has many luxuries, but laundry facilities are not one of them.
51
+ Instead, astronauts have other options.</description>
52
+ <pubDate>Tue, 20 May 2003 08:56:02 GMT</pubDate>
53
+ <guid>http://liftoff.msfc.nasa.gov/2003/05/20.html#item570</guid>
54
+ </item>
55
+ </channel>
56
+ </rss>