libxml4r 0.0.0 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/.autotest +30 -0
  2. data/README.rdoc +113 -9
  3. data/Rakefile +2 -1
  4. data/VERSION +1 -1
  5. data/lib/libxml4r.rb +229 -0
  6. data/libxml4r.gemspec +98 -0
  7. data/test/test_helper.rb +39 -0
  8. data/test/test_libxml4r.rb +34 -3
  9. data/test/test_xml_modifiers.rb +57 -0
  10. data/test/test_xml_outputters.rb +53 -0
  11. data/test/test_xml_readers.rb +59 -0
  12. data/test/xml/atom.xml +13 -0
  13. data/test/xml/books.xml +146 -0
  14. data/test/xml/breakfast_menu.xml +38 -0
  15. data/test/xml/document.xml +49 -0
  16. data/test/xml/merge_bug_data.xml +58 -0
  17. data/test/xml/namespaces.xml +22 -0
  18. data/test/xml/parts_system.xml +31 -0
  19. data/test/xml/plant_catalog.xml +336 -0
  20. data/test/xml/recipie.xml +18 -0
  21. data/test/xml/rss1.xml +58 -0
  22. data/test/xml/rss2.xml +56 -0
  23. data/test/xml/ruby_lang.xhtml +238 -0
  24. data/test/xml/rubynet.xml +79 -0
  25. data/test/xml/shiporder.xls +86 -0
  26. data/test/xml/shiporder.xml +23 -0
  27. data/test/xml/shiporder.xsd +31 -0
  28. data/test/xml/soap_create_path.xml +15 -0
  29. data/test/xml/soap_create_path_response.xml +16 -0
  30. data/test/xml/soap_create_reservation.xml +25 -0
  31. data/test/xml/soap_create_reservation_response.xml +64 -0
  32. data/test/xml/soap_get_price.xml +11 -0
  33. data/test/xml/soap_get_price_response.xml +11 -0
  34. data/test/xml/soap_manufacturer_names_response.xml +27 -0
  35. data/test/xml/soap_order_item.xml +17 -0
  36. data/test/xml/soap_order_item_response.xml +10 -0
  37. data/test/xml/soap_refresh_path.xml +15 -0
  38. data/test/xml/soap_refresh_path_response.xml +16 -0
  39. data/test/xml/soap_teardown_path.xml +15 -0
  40. data/test/xml/soap_teardown_path_response.xml +16 -0
  41. metadata +52 -3
@@ -0,0 +1,49 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?>
2
+ <!-- http://www.captain.at/howto-xml-xsl-example.php -->
3
+ <?xml-stylesheet type="text/xsl" href="test.xsl"?>
4
+ <document>
5
+ <menu>
6
+ <item>
7
+ <name>Captain</name>
8
+ <url>http://www.captain.at</url>
9
+ </item>
10
+ <item>
11
+ <name>Jupiter</name>
12
+ <url>http://www.jupiterradio.com</url>
13
+ </item>
14
+ <item>
15
+ <name>Plants</name>
16
+ <url>http://www.bryophyllum.com</url>
17
+ </item>
18
+ </menu>
19
+ <content>
20
+ <news>
21
+ <title>
22
+ test1
23
+ </title>
24
+ <news>
25
+ test 1 text
26
+ </news>
27
+ </news>
28
+ <news>
29
+ <title>
30
+ test2
31
+ </title>
32
+ <news>
33
+ <font face="courier">
34
+ <strong>test 2 text &#8801;</strong>
35
+ </font>
36
+ </news>
37
+ <include>
38
+ <data>
39
+ <item>
40
+ include-text1
41
+ </item>
42
+ <item>
43
+ include-text2
44
+ </item>
45
+ </data>
46
+ </include>
47
+ </news>
48
+ </content>
49
+ </document>
@@ -0,0 +1,58 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <template>
3
+ <body>
4
+ <section>
5
+ <txt>Some Preset Data Here</txt>
6
+ <txt>Some Preset Data Here</txt>
7
+ <txt>name: quack!</txt>
8
+ <txt>Some Preset Data Here</txt>
9
+ <txt>Some Preset Data Here</txt>
10
+ <txt>Some Preset Data Here</txt>
11
+ <txt>Some Preset Data Here</txt>
12
+ <txt>city: quack!</txt>
13
+ <txt>Some Preset Data Here</txt>
14
+ <txt>Some Preset Data Here</txt>
15
+ <txt>Some Preset Data Here</txt>
16
+ <txt>Some Preset Data Here</txt>
17
+ <txt>state: quack!</txt>
18
+ <txt>Some Preset Data Here</txt>
19
+ <txt>Some Preset Data Here</txt>
20
+ <txt>Some Preset Data Here</txt>
21
+ <txt>Some Preset Data Here</txt>
22
+ <row>
23
+ <txt>year: Vroom!</txt>
24
+ <txt>make: Vroom!</txt>
25
+ <txt>model: Vroom!</txt>
26
+ </row>
27
+ <row>
28
+ <txt>year: Vroom!</txt>
29
+ <txt>make: Vroom!</txt>
30
+ <txt>model: Vroom!</txt>
31
+ </row>
32
+ <row>
33
+ <txt>year: Vroom!</txt>
34
+ <txt>make: Vroom!</txt>
35
+ <txt>model: Vroom!</txt>
36
+ </row>
37
+ <txt>Some Preset Data Here</txt>
38
+ <txt>Some Preset Data Here</txt>
39
+ <row>
40
+ <txt>year: Vroom!</txt>
41
+ <txt>make: Vroom!</txt>
42
+ <txt>model: Vroom!</txt>
43
+ </row>
44
+ <row>
45
+ <txt>year: Vroom!</txt>
46
+ <txt>make: Vroom!</txt>
47
+ <txt>model: Vroom!</txt>
48
+ </row>
49
+ <row>
50
+ <txt>year: Vroom!</txt>
51
+ <txt>make: Vroom!</txt>
52
+ <txt>model: Vroom!</txt>
53
+ </row>
54
+ <txt>Some Preset Data Here</txt>
55
+ <txt>Some Preset Data Here</txt>
56
+ </section>
57
+ </body>
58
+ </template>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0"?>
2
+ <!-- http://www.xml.com/pub/a/1999/01/namespaces.html -->
3
+ <h:html xmlns:xdc="http://www.xml.com/books"
4
+ xmlns:h="http://www.w3.org/HTML/1998/html4">
5
+ <h:head><h:title>Book Review</h:title></h:head>
6
+ <h:body>
7
+ <xdc:bookreview>
8
+ <xdc:title>XML: A Primer</xdc:title>
9
+ <h:table>
10
+ <h:tr align="center">
11
+ <h:td>Author</h:td><h:td>Price</h:td>
12
+ <h:td>Pages</h:td><h:td>Date</h:td></h:tr>
13
+ <h:tr align="left">
14
+ <h:td><xdc:author>Simon St. Laurent</xdc:author></h:td>
15
+ <h:td><xdc:price>31.98</xdc:price></h:td>
16
+ <h:td><xdc:pages>352</xdc:pages></h:td>
17
+ <h:td><xdc:date>1998/01</xdc:date></h:td>
18
+ </h:tr>
19
+ </h:table>
20
+ </xdc:bookreview>
21
+ </h:body>
22
+ </h:html>
@@ -0,0 +1,31 @@
1
+ <?xml version="1.0"?>
2
+ <!-- http://www.comptechdoc.org/independent/web/xml/guide/xmlexample.html -->
3
+ <!DOCTYPE PARTS SYSTEM "parts.dtd">
4
+ <?xml-stylesheet type="text/css" href="xmlpartsstyle.css"?>
5
+ <PARTS>
6
+ <TITLE>Computer Parts</TITLE>
7
+ <PART>
8
+ <ITEM>Motherboard</ITEM>
9
+ <MANUFACTURER>ASUS</MANUFACTURER>
10
+ <MODEL>P3B-F</MODEL>
11
+ <COST> 123.00</COST>
12
+ </PART>
13
+ <PART>
14
+ <ITEM>Video Card</ITEM>
15
+ <MANUFACTURER>ATI</MANUFACTURER>
16
+ <MODEL>All-in-Wonder Pro</MODEL>
17
+ <COST> 160.00</COST>
18
+ </PART>
19
+ <PART>
20
+ <ITEM>Sound Card</ITEM>
21
+ <MANUFACTURER>Creative Labs</MANUFACTURER>
22
+ <MODEL>Sound Blaster Live</MODEL>
23
+ <COST> 80.00</COST>
24
+ </PART>
25
+ <PART>
26
+ <ITEMᡋ inch Monitor</ITEM>
27
+ <MANUFACTURER>LG Electronics</MANUFACTURER>
28
+ <MODEL> 995E</MODEL>
29
+ <COST> 290.00</COST>
30
+ </PART>
31
+ </PARTS>
@@ -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
+