vcdom 0.2.0 → 0.3.0
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.
- data/lib/vcdom/attr.rb +70 -0
- data/lib/vcdom/attr_node_map.rb +30 -0
- data/lib/vcdom/attr_ns.rb +38 -0
- data/lib/vcdom/character_data.rb +22 -0
- data/lib/vcdom/child.rb +53 -0
- data/lib/vcdom/document.rb +126 -0
- data/lib/vcdom/element.rb +332 -0
- data/lib/vcdom/element_ns.rb +44 -0
- data/lib/vcdom/node.rb +278 -0
- data/lib/vcdom/node_list.rb +32 -0
- data/lib/vcdom/parent.rb +126 -0
- data/lib/vcdom/text.rb +23 -0
- data/lib/vcdom/xml_parser.rb +368 -0
- data/lib/vcdom/xml_serializer.rb +55 -0
- metadata +48 -81
- data/History.txt +0 -4
- data/Manifest.txt +0 -34
- data/PostInstall.txt +0 -7
- data/README.rdoc +0 -51
- data/Rakefile +0 -26
- data/lib/vcdom/minidom/attr.rb +0 -139
- data/lib/vcdom/minidom/attr_ns.rb +0 -47
- data/lib/vcdom/minidom/cdata_section.rb +0 -34
- data/lib/vcdom/minidom/character_data.rb +0 -263
- data/lib/vcdom/minidom/comment.rb +0 -34
- data/lib/vcdom/minidom/document.rb +0 -245
- data/lib/vcdom/minidom/dom_exception.rb +0 -51
- data/lib/vcdom/minidom/dom_implementation.rb +0 -214
- data/lib/vcdom/minidom/element.rb +0 -512
- data/lib/vcdom/minidom/element_ns.rb +0 -42
- data/lib/vcdom/minidom/mini_parser.rb +0 -9
- data/lib/vcdom/minidom/mini_serializer.rb +0 -118
- data/lib/vcdom/minidom/minidom_standard_error.rb +0 -9
- data/lib/vcdom/minidom/mod_child_node.rb +0 -51
- data/lib/vcdom/minidom/mod_elements_getter.rb +0 -49
- data/lib/vcdom/minidom/mod_namespaceuri_manageable.rb +0 -152
- data/lib/vcdom/minidom/mod_parent_node.rb +0 -307
- data/lib/vcdom/minidom/named_node_map_attr.rb +0 -277
- data/lib/vcdom/minidom/node.rb +0 -178
- data/lib/vcdom/minidom/node_list.rb +0 -41
- data/lib/vcdom/minidom/text.rb +0 -77
- data/lib/vcdom/minidom/xml_reg_exp.rb +0 -39
- data/lib/vcdom/minidom.rb +0 -9
- data/lib/vcdom.rb +0 -6
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/test/test_helper.rb +0 -3
- data/test/test_vcdom.rb +0 -11
@@ -0,0 +1,368 @@
|
|
1
|
+
# coding : utf-8
|
2
|
+
|
3
|
+
require "vcdom/document"
|
4
|
+
|
5
|
+
module VCDOM
|
6
|
+
class XMLInput
|
7
|
+
def string_data
|
8
|
+
@string_data
|
9
|
+
end
|
10
|
+
def string_data=( str_data )
|
11
|
+
@string_data = str_data
|
12
|
+
end
|
13
|
+
end
|
14
|
+
class XMLContentHandler
|
15
|
+
def initialize( document_class )
|
16
|
+
@document_class = document_class
|
17
|
+
@ns_stack = Array.new()
|
18
|
+
end
|
19
|
+
def ns_stack
|
20
|
+
@ns_stack
|
21
|
+
end
|
22
|
+
def start_document
|
23
|
+
@doc = @document_class._new()
|
24
|
+
@cur = @doc
|
25
|
+
end
|
26
|
+
def end_document
|
27
|
+
return @doc
|
28
|
+
end
|
29
|
+
def on_stag( name, ns_uri )
|
30
|
+
@cur = @cur.append_child( @doc.create_element_ns( ns_uri, name ) )
|
31
|
+
end
|
32
|
+
def on_etag( name )
|
33
|
+
if @cur.node_name != name then
|
34
|
+
raise "[ERROR] @cur.node_name : #{@cur.node_name}, name : #{name}"
|
35
|
+
end
|
36
|
+
@cur = @cur.parent_node
|
37
|
+
end
|
38
|
+
def on_eetag( name, ns_uri )
|
39
|
+
@cur = @cur.append_child( @doc.create_element_ns( ns_uri, name ) )
|
40
|
+
end
|
41
|
+
def on_end_eetag()
|
42
|
+
@cur = @cur.parent_node
|
43
|
+
end
|
44
|
+
def on_begin_attr( name, ns_uri )
|
45
|
+
attr = @doc.create_attribute_ns( ns_uri, name )
|
46
|
+
@cur.set_attribute_node_ns( attr )
|
47
|
+
@cur = attr
|
48
|
+
end
|
49
|
+
def on_end_attr()
|
50
|
+
@cur = @cur.owner_element
|
51
|
+
end
|
52
|
+
def on_chardata( char_data )
|
53
|
+
@cur.append_child( @doc.create_text_node( char_data ) )
|
54
|
+
end
|
55
|
+
end
|
56
|
+
class XMLParser
|
57
|
+
|
58
|
+
def parse( input )
|
59
|
+
source = input.string_data
|
60
|
+
if source.class == String then
|
61
|
+
_parse_xml_str( source, XMLContentHandler.new( VCDOM::Document ) )
|
62
|
+
else
|
63
|
+
raise ArgumentTypeError.new()
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def _parse_xml_str( xml_str, content_handler )
|
68
|
+
content_handler.start_document()
|
69
|
+
i = 0
|
70
|
+
loop do
|
71
|
+
if xml_str[i].nil? then
|
72
|
+
break
|
73
|
+
elsif xml_str[i] == "<" then
|
74
|
+
i += 1
|
75
|
+
if xml_str[i] == "/" then
|
76
|
+
# ETag ::= '</' Name S? '>'
|
77
|
+
i = _parse_end_tag( xml_str, i+1, content_handler )
|
78
|
+
elsif xml_str[i] == "?" then
|
79
|
+
# PI
|
80
|
+
elsif xml_str[i] == "!" then
|
81
|
+
i += 1
|
82
|
+
if xml_str[i,2] == "--" then
|
83
|
+
# Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
|
84
|
+
i = _parse_comment( xml_str, i+2, content_handler )
|
85
|
+
elsif xml_str[i,7] == "[CDATA[" then
|
86
|
+
# CDATA
|
87
|
+
i = _parse_cdata( xml_str, i+7, content_handler )
|
88
|
+
else
|
89
|
+
$stdout << "ERROR" << "\n"
|
90
|
+
end
|
91
|
+
else
|
92
|
+
i = _parse_stag_or_eetag( xml_str, i, content_handler )
|
93
|
+
end
|
94
|
+
elsif xml_str[i] == "&" and not _is_char_ref_or_predef_entity_ref?( xml_str, i ) then
|
95
|
+
raise "NOT SUPPORT"
|
96
|
+
# Reference ::= EntityRef | CharRef
|
97
|
+
# EntityRef ::= '&' Name ';'
|
98
|
+
# CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
|
99
|
+
else
|
100
|
+
# CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
|
101
|
+
i = _parse_chardata_or_entity_reference( xml_str, i, content_handler )
|
102
|
+
end
|
103
|
+
end
|
104
|
+
return content_handler.end_document()
|
105
|
+
end
|
106
|
+
private :_parse_xml_str
|
107
|
+
|
108
|
+
def _parse_stag_or_eetag( str, i, content_handler )
|
109
|
+
#@listener.on_begin_stag_or_eetag()
|
110
|
+
# 要素名の取得
|
111
|
+
elem_name = String.new()
|
112
|
+
loop do
|
113
|
+
if str[i] != ">" and str[i] != "/" and str[i] != " " then
|
114
|
+
elem_name << str[i]
|
115
|
+
i += 1
|
116
|
+
else
|
117
|
+
break
|
118
|
+
end
|
119
|
+
end
|
120
|
+
if elem_name.length != 0 then
|
121
|
+
#@listener.on_tag_name( elem_name )
|
122
|
+
else
|
123
|
+
$stdout << "ERROR" << "\n"
|
124
|
+
end
|
125
|
+
# 属性の取得
|
126
|
+
attrs = Array.new()
|
127
|
+
ns_attrs = Array.new()
|
128
|
+
loop do
|
129
|
+
# 空白の除去
|
130
|
+
i = _skip_white_spaces( str, i )
|
131
|
+
# 属性リストの終了を確認
|
132
|
+
if str[i] == "/" or str[i] == ">" then
|
133
|
+
break
|
134
|
+
end
|
135
|
+
# 属性名の取得
|
136
|
+
attr_name = String.new()
|
137
|
+
loop do
|
138
|
+
if str[i] and str[i] != "=" and str[i] != " " then
|
139
|
+
attr_name << str[i]
|
140
|
+
i += 1
|
141
|
+
else
|
142
|
+
break
|
143
|
+
end
|
144
|
+
end
|
145
|
+
# 空白の除去
|
146
|
+
i = _skip_white_spaces( str, i )
|
147
|
+
# 等値記号の確認
|
148
|
+
if str[i] == "=" then
|
149
|
+
i += 1
|
150
|
+
else
|
151
|
+
raise "[ERROR] str[i] : #{str[i]}"
|
152
|
+
end
|
153
|
+
# 空白の除去
|
154
|
+
i = _skip_white_spaces( str, i )
|
155
|
+
# 属性値の取得
|
156
|
+
if str[i] == "\"" or str[i] == "'" then
|
157
|
+
quot = str[i]
|
158
|
+
i += 1
|
159
|
+
else
|
160
|
+
raise "[ERROR] str[i] : #{str[i]}"
|
161
|
+
end
|
162
|
+
attr_val = String.new
|
163
|
+
loop do
|
164
|
+
if str[i] and str[i] != quot then
|
165
|
+
attr_val << str[i]
|
166
|
+
i += 1
|
167
|
+
else
|
168
|
+
break
|
169
|
+
end
|
170
|
+
end
|
171
|
+
if str[i] == quot then
|
172
|
+
i += 1
|
173
|
+
else
|
174
|
+
raise "ERROR"
|
175
|
+
end
|
176
|
+
if attr_name == "xmlns" or attr_name[0,6] == "xmlns:" then
|
177
|
+
ns_attrs << [ attr_name, attr_val ]
|
178
|
+
else
|
179
|
+
attrs << [ attr_name, attr_val ]
|
180
|
+
end
|
181
|
+
end
|
182
|
+
# 空白の除去
|
183
|
+
i = _skip_white_spaces( str, i )
|
184
|
+
# この要素で使える名前空間 prefix を調整
|
185
|
+
if content_handler.ns_stack[-1] then
|
186
|
+
ns_map = content_handler.ns_stack[-1]
|
187
|
+
else
|
188
|
+
ns_map = { nil => nil }
|
189
|
+
end
|
190
|
+
if ns_attrs.length != 0 then
|
191
|
+
ns_map = ns_map.clone
|
192
|
+
ns_attrs.each do |ns_pair|
|
193
|
+
# ns_pair[0] : attr_name, ns_pair[1] : attr_value
|
194
|
+
if ns_pair[0] == "xmlns" then
|
195
|
+
ns_map[nil] = ns_pair[1]
|
196
|
+
else
|
197
|
+
ns_map[ ns_pair[0][6..-1].intern ] = ns_pair[1]
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
# 最後の ">" または "/>" の確認
|
202
|
+
is_eetag = false
|
203
|
+
if str[i] == ">" then
|
204
|
+
# 名前空間スタックに積む
|
205
|
+
content_handler.ns_stack.push( ns_map )
|
206
|
+
i += 1
|
207
|
+
elsif str[i] == "/" and str[i+1] == ">" then
|
208
|
+
is_eetag = true
|
209
|
+
i += 2
|
210
|
+
else
|
211
|
+
$stdout << "ERROR" << "\n"
|
212
|
+
end
|
213
|
+
# 要素の処理
|
214
|
+
name_pair = elem_name.split /:/
|
215
|
+
if name_pair.length == 1 then
|
216
|
+
ns_uri = ns_map[nil]
|
217
|
+
elsif name_pair.length == 2 then
|
218
|
+
if name_pair[0] != "xml" then
|
219
|
+
ns_uri = ns_map[ name_pair[0].intern ]
|
220
|
+
else
|
221
|
+
ns_uri = "http://www.w3.org/XML/1998/namespace"
|
222
|
+
end
|
223
|
+
else
|
224
|
+
raise "ERROR"
|
225
|
+
end
|
226
|
+
if is_eetag then
|
227
|
+
content_handler.on_eetag( elem_name, ns_uri )
|
228
|
+
else
|
229
|
+
content_handler.on_stag( elem_name, ns_uri )
|
230
|
+
end
|
231
|
+
# 属性の処理
|
232
|
+
ns_attrs.each do |attr|
|
233
|
+
content_handler.on_begin_attr( attr[0], "http://www.w3.org/2000/xmlns/" )
|
234
|
+
content_handler.on_chardata( attr[1] ) if attr[1]
|
235
|
+
content_handler.on_end_attr()
|
236
|
+
end
|
237
|
+
attrs.each do |attr|
|
238
|
+
if attr[0][0,4] == "xml:" then
|
239
|
+
content_handler.on_begin_attr( attr[0], "http://www.w3.org/XML/1998/namespace" )
|
240
|
+
else
|
241
|
+
name_pair = attr[0].split /:/
|
242
|
+
if name_pair.length == 1 then
|
243
|
+
content_handler.on_begin_attr( attr[0], nil )
|
244
|
+
elsif name_pair.length == 2 then
|
245
|
+
content_handler.on_begin_attr( attr[0], ns_map[ name_pair[0].intern ] )
|
246
|
+
end
|
247
|
+
end
|
248
|
+
content_handler.on_chardata( attr[1] ) if attr[1]
|
249
|
+
content_handler.on_end_attr()
|
250
|
+
end
|
251
|
+
if is_eetag then
|
252
|
+
content_handler.on_end_eetag()
|
253
|
+
end
|
254
|
+
return i
|
255
|
+
end
|
256
|
+
|
257
|
+
def _parse_end_tag( str, i, content_handler )
|
258
|
+
# 要素名の取得
|
259
|
+
elem_name = String.new
|
260
|
+
loop do
|
261
|
+
if str[i] != ">" && str != " " then
|
262
|
+
elem_name << str[i]
|
263
|
+
i += 1
|
264
|
+
else
|
265
|
+
break
|
266
|
+
end
|
267
|
+
end
|
268
|
+
if elem_name.length == 0 then
|
269
|
+
$stdout << "ERROR" << "\n"
|
270
|
+
end
|
271
|
+
# 空白の除去
|
272
|
+
i = _skip_white_spaces( str, i )
|
273
|
+
if str[i] == ">" then
|
274
|
+
i += 1
|
275
|
+
else
|
276
|
+
$stdout << "ERROR" << "\n"
|
277
|
+
end
|
278
|
+
content_handler.on_etag( elem_name )
|
279
|
+
# 名前空間スタックにから取り出す
|
280
|
+
content_handler.ns_stack.pop()
|
281
|
+
return i
|
282
|
+
end
|
283
|
+
|
284
|
+
def _is_char_ref_or_predef_entity_ref?( str, i )
|
285
|
+
if str[i] == "&" then
|
286
|
+
if str[i+1] == "#" then
|
287
|
+
return true
|
288
|
+
elsif str[i+2,3] == "lt;" or str[i+2,3] == "gt;" or str[i+2,5] == "quot;" or
|
289
|
+
str[i+2,5] == "apos;" or str[i+2,4] == "amp;" then
|
290
|
+
return true
|
291
|
+
else
|
292
|
+
return false
|
293
|
+
end
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
def _parse_chardata_or_entity_reference( str, i, content_handler )
|
298
|
+
# CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
|
299
|
+
chardata = String.new()
|
300
|
+
loop do
|
301
|
+
if str[i].nil? or str[i] == "<" then
|
302
|
+
break
|
303
|
+
#elsif str[i] == "]" and str[i+1] == "]" and str[i+2] == ">" then
|
304
|
+
# break
|
305
|
+
elsif str[i] == "&" then
|
306
|
+
if str[i+1] != "#" then
|
307
|
+
if str[i+2,3] == "lt;" then
|
308
|
+
chardata << "<"
|
309
|
+
elsif str[i+2,3] == "gt;" then
|
310
|
+
chardata << ">"
|
311
|
+
elsif str[i+2,5] == "quot;" then
|
312
|
+
chardata << "\""
|
313
|
+
elsif str[i+2,5] == "apos;" then
|
314
|
+
chardata << "'"
|
315
|
+
elsif str[i+2,4] == "amp;" then
|
316
|
+
chardata << "&"
|
317
|
+
else
|
318
|
+
# entity reference
|
319
|
+
break
|
320
|
+
end
|
321
|
+
else
|
322
|
+
# when character reference
|
323
|
+
i += 2
|
324
|
+
num = String.new()
|
325
|
+
loop do
|
326
|
+
if str[i].nil? then
|
327
|
+
raise "ERROR"
|
328
|
+
elsif str[i] != ";" then
|
329
|
+
num << str[i]
|
330
|
+
i += 1
|
331
|
+
else
|
332
|
+
break
|
333
|
+
end
|
334
|
+
end
|
335
|
+
if num[0] == "x" then
|
336
|
+
num = num[1..-1].to_i(16)
|
337
|
+
else
|
338
|
+
num = num.to_i
|
339
|
+
end
|
340
|
+
chardata << [num].pack("U")
|
341
|
+
if str[i] == ";" then
|
342
|
+
i += 1
|
343
|
+
else
|
344
|
+
raise "ERROR"
|
345
|
+
end
|
346
|
+
end
|
347
|
+
else
|
348
|
+
chardata << str[i]
|
349
|
+
i += 1
|
350
|
+
end
|
351
|
+
end
|
352
|
+
content_handler.on_chardata( chardata )
|
353
|
+
return i
|
354
|
+
end
|
355
|
+
|
356
|
+
def _skip_white_spaces( str, i )
|
357
|
+
loop do
|
358
|
+
if str[i] == " " then
|
359
|
+
i += 1
|
360
|
+
else
|
361
|
+
break
|
362
|
+
end
|
363
|
+
end
|
364
|
+
return i
|
365
|
+
end
|
366
|
+
|
367
|
+
end
|
368
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# coding : utf-8
|
2
|
+
|
3
|
+
require "vcdom/node"
|
4
|
+
|
5
|
+
module VCDOM
|
6
|
+
class XMLSerializer
|
7
|
+
|
8
|
+
def write_to_string( node )
|
9
|
+
str = String.new
|
10
|
+
_write_to_string( node, str )
|
11
|
+
str
|
12
|
+
end
|
13
|
+
|
14
|
+
def _write_to_string( node, str )
|
15
|
+
case node.node_type
|
16
|
+
when Node::DOCUMENT_NODE then
|
17
|
+
node.each_child_node do |n|
|
18
|
+
_write_to_string( n, str )
|
19
|
+
end
|
20
|
+
when Node::ELEMENT_NODE then
|
21
|
+
str << "<#{node.tag_name}"
|
22
|
+
_write_to_string_attrs( node, str )
|
23
|
+
str << ">"
|
24
|
+
node.each_child_node do |n|
|
25
|
+
_write_to_string( n, str )
|
26
|
+
end
|
27
|
+
str << "</#{node.tag_name}>"
|
28
|
+
when Node::TEXT_NODE then
|
29
|
+
str << node.data
|
30
|
+
else
|
31
|
+
raise "NOT SUPPORTED: " + node.inspect
|
32
|
+
end
|
33
|
+
end
|
34
|
+
private :_write_to_string
|
35
|
+
|
36
|
+
def _write_to_string_attrs( node, str )
|
37
|
+
node.each_attr_node do |n|
|
38
|
+
str << " "
|
39
|
+
str << n.name
|
40
|
+
str << "=\""
|
41
|
+
n.each_child_node do |c|
|
42
|
+
case c.node_type
|
43
|
+
when Node::TEXT_NODE then
|
44
|
+
str << c.data
|
45
|
+
else
|
46
|
+
raise "SORRY... UNSUPORTED"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
str << "\""
|
50
|
+
end
|
51
|
+
end
|
52
|
+
private :_write_to_string
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
metadata
CHANGED
@@ -1,122 +1,89 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcdom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
version: 0.3.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
|
-
-
|
12
|
+
- nobuoka
|
8
13
|
autorequire:
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-12-04 00:00:00 +09:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 2.0.3
|
24
|
-
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: gemcutter
|
27
|
-
type: :development
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
name: thoughtbot-shoulda
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
30
25
|
requirements:
|
31
26
|
- - ">="
|
32
27
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
name: hoe
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
37
31
|
type: :development
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 2.5.0
|
44
|
-
version:
|
45
|
-
description: This library provides DOM implementation(s).
|
46
|
-
email:
|
47
|
-
- nobuoka@r-definition.com
|
32
|
+
version_requirements: *id001
|
33
|
+
description: This gem is a one of implementations of W3C DOM....
|
34
|
+
email: nobuoka@r-definition.com
|
48
35
|
executables: []
|
49
36
|
|
50
37
|
extensions: []
|
51
38
|
|
52
|
-
extra_rdoc_files:
|
53
|
-
|
54
|
-
- Manifest.txt
|
55
|
-
- PostInstall.txt
|
39
|
+
extra_rdoc_files: []
|
40
|
+
|
56
41
|
files:
|
57
|
-
-
|
58
|
-
-
|
59
|
-
-
|
60
|
-
-
|
61
|
-
-
|
62
|
-
- lib/vcdom.rb
|
63
|
-
- lib/vcdom/
|
64
|
-
- lib/vcdom/
|
65
|
-
- lib/vcdom/
|
66
|
-
- lib/vcdom/
|
67
|
-
- lib/vcdom/
|
68
|
-
- lib/vcdom/
|
69
|
-
- lib/vcdom/
|
70
|
-
- lib/vcdom/
|
71
|
-
- lib/vcdom/minidom/dom_implementation.rb
|
72
|
-
- lib/vcdom/minidom/element.rb
|
73
|
-
- lib/vcdom/minidom/element_ns.rb
|
74
|
-
- lib/vcdom/minidom/mini_parser.rb
|
75
|
-
- lib/vcdom/minidom/mini_serializer.rb
|
76
|
-
- lib/vcdom/minidom/minidom_standard_error.rb
|
77
|
-
- lib/vcdom/minidom/mod_child_node.rb
|
78
|
-
- lib/vcdom/minidom/mod_parent_node.rb
|
79
|
-
- lib/vcdom/minidom/mod_elements_getter.rb
|
80
|
-
- lib/vcdom/minidom/mod_namespaceuri_manageable.rb
|
81
|
-
- lib/vcdom/minidom/named_node_map_attr.rb
|
82
|
-
- lib/vcdom/minidom/node_list.rb
|
83
|
-
- lib/vcdom/minidom/node.rb
|
84
|
-
- lib/vcdom/minidom/text.rb
|
85
|
-
- lib/vcdom/minidom/xml_reg_exp.rb
|
86
|
-
- script/console
|
87
|
-
- script/destroy
|
88
|
-
- script/generate
|
89
|
-
- test/test_helper.rb
|
90
|
-
- test/test_vcdom.rb
|
42
|
+
- lib/vcdom/attr.rb
|
43
|
+
- lib/vcdom/attr_ns.rb
|
44
|
+
- lib/vcdom/attr_node_map.rb
|
45
|
+
- lib/vcdom/character_data.rb
|
46
|
+
- lib/vcdom/child.rb
|
47
|
+
- lib/vcdom/document.rb
|
48
|
+
- lib/vcdom/element.rb
|
49
|
+
- lib/vcdom/element_ns.rb
|
50
|
+
- lib/vcdom/node.rb
|
51
|
+
- lib/vcdom/node_list.rb
|
52
|
+
- lib/vcdom/parent.rb
|
53
|
+
- lib/vcdom/text.rb
|
54
|
+
- lib/vcdom/xml_parser.rb
|
55
|
+
- lib/vcdom/xml_serializer.rb
|
91
56
|
has_rdoc: true
|
92
|
-
homepage:
|
57
|
+
homepage:
|
93
58
|
licenses: []
|
94
59
|
|
95
|
-
post_install_message:
|
60
|
+
post_install_message:
|
96
61
|
rdoc_options:
|
97
|
-
- --
|
98
|
-
- README.rdoc
|
62
|
+
- --charset=UTF-8
|
99
63
|
require_paths:
|
100
64
|
- lib
|
101
65
|
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
102
67
|
requirements:
|
103
68
|
- - ">="
|
104
69
|
- !ruby/object:Gem::Version
|
70
|
+
segments:
|
71
|
+
- 0
|
105
72
|
version: "0"
|
106
|
-
version:
|
107
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
108
75
|
requirements:
|
109
76
|
- - ">="
|
110
77
|
- !ruby/object:Gem::Version
|
78
|
+
segments:
|
79
|
+
- 0
|
111
80
|
version: "0"
|
112
|
-
version:
|
113
81
|
requirements: []
|
114
82
|
|
115
|
-
rubyforge_project:
|
116
|
-
rubygems_version: 1.3.
|
83
|
+
rubyforge_project:
|
84
|
+
rubygems_version: 1.3.7
|
117
85
|
signing_key:
|
118
86
|
specification_version: 3
|
119
|
-
summary: This
|
120
|
-
test_files:
|
121
|
-
|
122
|
-
- test/test_helper.rb
|
87
|
+
summary: This gem is a one of implementations of W3C DOM.
|
88
|
+
test_files: []
|
89
|
+
|
data/History.txt
DELETED
data/Manifest.txt
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
PostInstall.txt
|
4
|
-
README.rdoc
|
5
|
-
Rakefile
|
6
|
-
lib/vcdom.rb
|
7
|
-
lib/vcdom/minidom.rb
|
8
|
-
lib/vcdom/minidom/attr.rb
|
9
|
-
lib/vcdom/minidom/attr_ns.rb
|
10
|
-
lib/vcdom/minidom/cdata_section.rb
|
11
|
-
lib/vcdom/minidom/character_data.rb
|
12
|
-
lib/vcdom/minidom/comment.rb
|
13
|
-
lib/vcdom/minidom/document.rb
|
14
|
-
lib/vcdom/minidom/dom_exception.rb
|
15
|
-
lib/vcdom/minidom/dom_implementation.rb
|
16
|
-
lib/vcdom/minidom/element.rb
|
17
|
-
lib/vcdom/minidom/element_ns.rb
|
18
|
-
lib/vcdom/minidom/mini_parser.rb
|
19
|
-
lib/vcdom/minidom/mini_serializer.rb
|
20
|
-
lib/vcdom/minidom/minidom_standard_error.rb
|
21
|
-
lib/vcdom/minidom/mod_child_node.rb
|
22
|
-
lib/vcdom/minidom/mod_parent_node.rb
|
23
|
-
lib/vcdom/minidom/mod_elements_getter.rb
|
24
|
-
lib/vcdom/minidom/mod_namespaceuri_manageable.rb
|
25
|
-
lib/vcdom/minidom/named_node_map_attr.rb
|
26
|
-
lib/vcdom/minidom/node_list.rb
|
27
|
-
lib/vcdom/minidom/node.rb
|
28
|
-
lib/vcdom/minidom/text.rb
|
29
|
-
lib/vcdom/minidom/xml_reg_exp.rb
|
30
|
-
script/console
|
31
|
-
script/destroy
|
32
|
-
script/generate
|
33
|
-
test/test_helper.rb
|
34
|
-
test/test_vcdom.rb
|
data/PostInstall.txt
DELETED
data/README.rdoc
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
= vcdom
|
2
|
-
|
3
|
-
* http://vcdom.rubyforge.org/
|
4
|
-
|
5
|
-
== DESCRIPTION:
|
6
|
-
|
7
|
-
This library provides DOM implementation(s).
|
8
|
-
|
9
|
-
== FEATURES/PROBLEMS:
|
10
|
-
|
11
|
-
* list of features or problems
|
12
|
-
|
13
|
-
== SYNOPSIS:
|
14
|
-
|
15
|
-
impl = VCDOM::MiniDOM.get_dom_implementation()
|
16
|
-
doc = impl.create_document( nil, "test", nil )
|
17
|
-
doc.document_element.text_content = "This is an XML for test."
|
18
|
-
$stdout << impl.mini_serializer.write_to_string( doc ) << "\n"
|
19
|
-
|
20
|
-
== REQUIREMENTS:
|
21
|
-
|
22
|
-
* list of requirements
|
23
|
-
|
24
|
-
== INSTALL:
|
25
|
-
|
26
|
-
* sudo gem install vcdom
|
27
|
-
|
28
|
-
== LICENSE:
|
29
|
-
|
30
|
-
(The MIT License)
|
31
|
-
|
32
|
-
Copyright (c) 2010 Y. NOBUOKA
|
33
|
-
|
34
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
35
|
-
a copy of this software and associated documentation files (the
|
36
|
-
'Software'), to deal in the Software without restriction, including
|
37
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
38
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
39
|
-
permit persons to whom the Software is furnished to do so, subject to
|
40
|
-
the following conditions:
|
41
|
-
|
42
|
-
The above copyright notice and this permission notice shall be
|
43
|
-
included in all copies or substantial portions of the Software.
|
44
|
-
|
45
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
46
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
47
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
48
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
49
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
50
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
51
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|