libxml-ruby 0.8.3 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/CHANGES +18 -0
  2. data/RAKEFILE +15 -39
  3. data/README +48 -47
  4. data/ext/libxml/libxml.c +847 -22
  5. data/ext/libxml/ruby_libxml.h +71 -95
  6. data/ext/libxml/ruby_xml_attr.c +500 -500
  7. data/ext/libxml/ruby_xml_attributes.c +1 -1
  8. data/ext/libxml/ruby_xml_document.c +1144 -1135
  9. data/ext/libxml/ruby_xml_document.h +4 -11
  10. data/ext/libxml/ruby_xml_dtd.c +27 -0
  11. data/ext/libxml/ruby_xml_encoding.c +164 -0
  12. data/ext/libxml/ruby_xml_encoding.h +13 -0
  13. data/ext/libxml/ruby_xml_error.c +941 -0
  14. data/ext/libxml/ruby_xml_error.h +13 -0
  15. data/ext/libxml/ruby_xml_html_parser.c +71 -387
  16. data/ext/libxml/ruby_xml_html_parser.h +1 -17
  17. data/ext/libxml/ruby_xml_input.c +179 -0
  18. data/ext/libxml/ruby_xml_input.h +18 -0
  19. data/ext/libxml/ruby_xml_input_cbg.c +17 -3
  20. data/ext/libxml/ruby_xml_node.c +1566 -1582
  21. data/ext/libxml/ruby_xml_node.h +1 -4
  22. data/ext/libxml/ruby_xml_ns.c +14 -3
  23. data/ext/libxml/ruby_xml_parser.c +164 -1398
  24. data/ext/libxml/ruby_xml_parser.h +5 -17
  25. data/ext/libxml/ruby_xml_parser_context.c +131 -169
  26. data/ext/libxml/ruby_xml_parser_context.h +2 -9
  27. data/ext/libxml/ruby_xml_reader.c +910 -945
  28. data/ext/libxml/ruby_xml_relaxng.c +32 -3
  29. data/ext/libxml/ruby_xml_sax_parser.c +106 -364
  30. data/ext/libxml/ruby_xml_sax_parser.h +1 -37
  31. data/ext/libxml/ruby_xml_schema.c +174 -145
  32. data/ext/libxml/ruby_xml_xinclude.c +9 -5
  33. data/ext/libxml/ruby_xml_xpath.c +25 -6
  34. data/ext/libxml/ruby_xml_xpath.h +1 -2
  35. data/ext/libxml/ruby_xml_xpath_context.c +17 -19
  36. data/ext/libxml/ruby_xml_xpath_object.c +60 -56
  37. data/ext/libxml/ruby_xml_xpointer.c +11 -5
  38. data/ext/libxml/sax_parser_callbacks.inc +42 -37
  39. data/ext/libxml/version.h +3 -3
  40. data/ext/mingw/Rakefile +20 -27
  41. data/ext/mingw/build.rake +41 -0
  42. data/ext/vc/libxml_ruby.vcproj +23 -15
  43. data/lib/libxml.rb +8 -2
  44. data/lib/libxml/document.rb +16 -4
  45. data/lib/libxml/error.rb +84 -0
  46. data/lib/libxml/hpricot.rb +76 -0
  47. data/lib/libxml/html_parser.rb +61 -0
  48. data/lib/libxml/node.rb +36 -25
  49. data/lib/libxml/parser.rb +312 -33
  50. data/lib/libxml/parser_context.rb +17 -0
  51. data/lib/libxml/properties.rb +15 -2
  52. data/lib/libxml/reader.rb +15 -0
  53. data/lib/libxml/sax_callbacks.rb +179 -0
  54. data/lib/libxml/sax_parser.rb +42 -0
  55. data/lib/libxml/tree.rb +1 -2
  56. data/lib/libxml/xpath_object.rb +12 -0
  57. data/test/model/atom.xml +4 -0
  58. data/test/tc_attributes.rb +43 -19
  59. data/test/tc_document.rb +1 -1
  60. data/test/tc_document_write.rb +15 -8
  61. data/test/tc_dtd.rb +36 -20
  62. data/test/tc_encoding.rb +13 -0
  63. data/test/tc_error.rb +136 -0
  64. data/test/tc_node.rb +2 -3
  65. data/test/tc_node_copy.rb +1 -1
  66. data/test/tc_node_edit.rb +6 -0
  67. data/test/tc_ns.rb +18 -0
  68. data/test/tc_parser.rb +113 -228
  69. data/test/tc_parser_context.rb +1 -2
  70. data/test/tc_reader.rb +24 -14
  71. data/test/tc_relaxng.rb +18 -6
  72. data/test/tc_sax_parser.rb +48 -13
  73. data/test/tc_schema.rb +20 -8
  74. data/test/tc_well_formed.rb +2 -1
  75. data/test/tc_xml.rb +212 -0
  76. data/test/tc_xpath.rb +60 -46
  77. data/test/tc_xpointer.rb +7 -11
  78. data/test/test_suite.rb +4 -3
  79. metadata +26 -109
  80. data/doc/rdoc/classes/LibXML.html +0 -241
  81. data/doc/rdoc/classes/LibXML/XML.html +0 -185
  82. data/doc/rdoc/classes/LibXML/XML/Attr.html +0 -1010
  83. data/doc/rdoc/classes/LibXML/XML/Attributes.html +0 -526
  84. data/doc/rdoc/classes/LibXML/XML/Document.html +0 -1489
  85. data/doc/rdoc/classes/LibXML/XML/Dtd.html +0 -213
  86. data/doc/rdoc/classes/LibXML/XML/Error.html +0 -117
  87. data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +0 -348
  88. data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +0 -160
  89. data/doc/rdoc/classes/LibXML/XML/NS.html +0 -381
  90. data/doc/rdoc/classes/LibXML/XML/Node.html +0 -3396
  91. data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +0 -123
  92. data/doc/rdoc/classes/LibXML/XML/Node/Set.html +0 -440
  93. data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +0 -123
  94. data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +0 -123
  95. data/doc/rdoc/classes/LibXML/XML/Parser.html +0 -2239
  96. data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +0 -1255
  97. data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +0 -123
  98. data/doc/rdoc/classes/LibXML/XML/Reader.html +0 -2264
  99. data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +0 -237
  100. data/doc/rdoc/classes/LibXML/XML/SaxParser.html +0 -415
  101. data/doc/rdoc/classes/LibXML/XML/Schema.html +0 -308
  102. data/doc/rdoc/classes/LibXML/XML/State.html +0 -124
  103. data/doc/rdoc/classes/LibXML/XML/Tree.html +0 -111
  104. data/doc/rdoc/classes/LibXML/XML/XInclude.html +0 -123
  105. data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +0 -117
  106. data/doc/rdoc/classes/LibXML/XML/XMLParserOptions.html +0 -198
  107. data/doc/rdoc/classes/LibXML/XML/XPath.html +0 -184
  108. data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +0 -404
  109. data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +0 -172
  110. data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +0 -627
  111. data/doc/rdoc/classes/LibXML/XML/XPointer.html +0 -170
  112. data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +0 -123
  113. data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +0 -117
  114. data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +0 -124
  115. data/doc/rdoc/classes/singleton.html +0 -114
  116. data/doc/rdoc/created.rid +0 -1
  117. data/doc/rdoc/files/CHANGES.html +0 -442
  118. data/doc/rdoc/files/LICENSE.html +0 -133
  119. data/doc/rdoc/files/README.html +0 -388
  120. data/doc/rdoc/files/VERSION.html +0 -107
  121. data/doc/rdoc/files/ext/libxml/cbg_c.html +0 -101
  122. data/doc/rdoc/files/ext/libxml/libxml_c.html +0 -101
  123. data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +0 -101
  124. data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +0 -101
  125. data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +0 -101
  126. data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +0 -101
  127. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +0 -101
  128. data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +0 -101
  129. data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +0 -101
  130. data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +0 -101
  131. data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +0 -101
  132. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +0 -101
  133. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +0 -101
  134. data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +0 -101
  135. data/doc/rdoc/files/ext/libxml/ruby_xml_relaxng_c.html +0 -101
  136. data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +0 -101
  137. data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +0 -101
  138. data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +0 -101
  139. data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +0 -101
  140. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +0 -101
  141. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +0 -101
  142. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +0 -101
  143. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +0 -101
  144. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +0 -101
  145. data/doc/rdoc/files/lib/libxml/attr_rb.html +0 -108
  146. data/doc/rdoc/files/lib/libxml/attributes_rb.html +0 -108
  147. data/doc/rdoc/files/lib/libxml/document_rb.html +0 -108
  148. data/doc/rdoc/files/lib/libxml/node_rb.html +0 -108
  149. data/doc/rdoc/files/lib/libxml/node_set_rb.html +0 -108
  150. data/doc/rdoc/files/lib/libxml/parser_options_rb.html +0 -107
  151. data/doc/rdoc/files/lib/libxml/parser_rb.html +0 -101
  152. data/doc/rdoc/files/lib/libxml/properties_rb.html +0 -108
  153. data/doc/rdoc/files/lib/libxml/tree_rb.html +0 -107
  154. data/doc/rdoc/files/lib/libxml_rb.html +0 -124
  155. data/doc/rdoc/files/lib/xml/libxml_rb.html +0 -124
  156. data/doc/rdoc/files/lib/xml_rb.html +0 -134
  157. data/doc/rdoc/fr_class_index.html +0 -62
  158. data/doc/rdoc/fr_file_index.html +0 -66
  159. data/doc/rdoc/fr_method_index.html +0 -392
  160. data/doc/rdoc/index.html +0 -24
  161. data/doc/rdoc/rdoc-style.css +0 -208
  162. data/ext/libxml/ruby_xml_node_set.c +0 -172
  163. data/ext/libxml/ruby_xml_node_set.h +0 -20
  164. data/ext/libxml/ruby_xml_xpointer_context.c +0 -22
  165. data/ext/libxml/ruby_xml_xpointer_context.h +0 -18
  166. data/lib/libxml/node_set.rb +0 -27
  167. data/test/tc_node_set.rb +0 -24
  168. data/test/tc_node_set2.rb +0 -37
@@ -1,213 +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: LibXML::XML::Dtd</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">LibXML::XML::Dtd</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/ext/libxml/libxml_c.html">
59
- ext/libxml/libxml.c
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- SV * parse_string(CLASS, str, &#8230;)
84
- </p>
85
- <pre>
86
- char * CLASS
87
- char * str
88
- PREINIT:
89
- STRLEN n_a;
90
- xmlDtdPtr res;
91
- SV * encoding_sv;
92
- xmlParserInputBufferPtr buffer;
93
- xmlCharEncoding enc = XML_CHAR_ENCODING_NONE;
94
- xmlChar * new_string;
95
- STRLEN len;
96
- CODE:
97
- LibXML_init_error();
98
- if (items &gt; 2) {
99
- encoding_sv = ST(2);
100
- if (items &gt; 3) {
101
- croak(&quot;parse_string: too many parameters&quot;);
102
- }
103
- // warn(&quot;getting encoding...\n&quot;);
104
- enc = xmlParseCharEncoding(SvPV(encoding_sv, n_a));
105
- if (enc == XML_CHAR_ENCODING_ERROR) {
106
- croak(&quot;Parse of encoding %s failed: %s&quot;, SvPV(encoding_sv, n_a), SvPV(LibXML_error, n_a));
107
- }
108
- }
109
- buffer = xmlAllocParserInputBuffer(enc);
110
- // buffer = xmlParserInputBufferCreateMem(str, xmlStrlen(str), enc);
111
- if ( !buffer)
112
- croak(&quot;cant create buffer!\n&quot; );
113
-
114
- new_string = xmlStrdup((const xmlChar*)str);
115
- xmlParserInputBufferPush(buffer, xmlStrlen(new_string), (const char*)new_string);
116
-
117
- res = xmlIOParseDTD(NULL, buffer, enc);
118
-
119
- // NOTE: For some reason freeing this InputBuffer causes a segfault!
120
- // xmlFreeParserInputBuffer(buffer);
121
- xmlFree(new_string);
122
-
123
- sv_2mortal( LibXML_error );
124
- LibXML_croak_error();
125
-
126
- if (res == NULL) {
127
- croak(&quot;no DTD parsed!&quot;);
128
- }
129
- RETVAL = PmmNodeToSv((xmlNodePtr)res, NULL);
130
- OUTPUT:
131
- RETVAL
132
- </pre>
133
-
134
- </div>
135
-
136
-
137
- </div>
138
-
139
- <div id="method-list">
140
- <h3 class="section-bar">Methods</h3>
141
-
142
- <div class="name-list">
143
- <a href="#M000323">new</a>&nbsp;&nbsp;
144
- </div>
145
- </div>
146
-
147
- </div>
148
-
149
-
150
- <!-- if includes -->
151
-
152
- <div id="section">
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
- <!-- if method_list -->
162
- <div id="methods">
163
- <h3 class="section-bar">Public Class methods</h3>
164
-
165
- <div id="method-M000323" class="method-detail">
166
- <a name="M000323"></a>
167
-
168
- <div class="method-heading">
169
- <a href="#M000323" class="method-signature">
170
- <span class="method-name">XML::Dtd.new("public system") &rarr; dtd<br />
171
- XML::Dtd.new("public", "system") &rarr; dtd<br />
172
- </span>
173
- </a>
174
- </div>
175
-
176
- <div class="method-description">
177
- <p>
178
- Create a <a href="Dtd.html#M000323">new</a> <a href="Dtd.html">Dtd</a> from
179
- the specified public and system identifiers.
180
- </p>
181
- <p><a class="source-toggle" href="#"
182
- onclick="toggleCode('M000323-source');return false;">[Source]</a></p>
183
- <div class="method-source-code" id="M000323-source">
184
- <pre>
185
- /*
186
- * call-seq:
187
- * XML::Dtd.new(&quot;public system&quot;) -&gt; dtd
188
- * XML::Dtd.new(&quot;public&quot;, &quot;system&quot;) -&gt; dtd
189
- *
190
- * Create a new Dtd from the specified public and system
191
- * identifiers.
192
- */
193
- VALUE
194
- ruby_xml_dtd_initialize(int argc, VALUE *argv, VALUE class) {
195
-
196
- </pre>
197
- </div>
198
- </div>
199
- </div>
200
-
201
-
202
- </div>
203
-
204
-
205
- </div>
206
-
207
-
208
- <div id="validator-badges">
209
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
210
- </div>
211
-
212
- </body>
213
- </html>
@@ -1,117 +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: LibXML::XML::Error</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">LibXML::XML::Error</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/ext/libxml/libxml_c.html">
59
- ext/libxml/libxml.c
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- RuntimeError
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- Some libxml memory goo that should be done before anything else
84
- </p>
85
-
86
- </div>
87
-
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
-
95
- <!-- if includes -->
96
-
97
- <div id="section">
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
- <!-- if method_list -->
107
-
108
-
109
- </div>
110
-
111
-
112
- <div id="validator-badges">
113
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
114
- </div>
115
-
116
- </body>
117
- </html>
@@ -1,348 +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: LibXML::XML::HTMLParser</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">LibXML::XML::HTMLParser</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/ext/libxml/libxml_c.html">
59
- ext/libxml/libxml.c
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- call-seq:
84
- </p>
85
- <pre>
86
- parser.string = &quot;string&quot;
87
- </pre>
88
- <p>
89
- Set the <a href="HTMLParser.html#M000362">string</a> this parser works
90
- with.
91
- </p>
92
-
93
- </div>
94
-
95
-
96
- </div>
97
-
98
- <div id="method-list">
99
- <h3 class="section-bar">Methods</h3>
100
-
101
- <div class="name-list">
102
- <a href="#M000364">context</a>&nbsp;&nbsp;
103
- <a href="#M000361">new</a>&nbsp;&nbsp;
104
- <a href="#M000363">parse</a>&nbsp;&nbsp;
105
- <a href="#M000362">string</a>&nbsp;&nbsp;
106
- <a href="#M000365">string</a>&nbsp;&nbsp;
107
- <a href="#M000366">string=</a>&nbsp;&nbsp;
108
- </div>
109
- </div>
110
-
111
- </div>
112
-
113
-
114
- <!-- if includes -->
115
-
116
- <div id="section">
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
- <!-- if method_list -->
126
- <div id="methods">
127
- <h3 class="section-bar">Public Class methods</h3>
128
-
129
- <div id="method-M000361" class="method-detail">
130
- <a name="M000361"></a>
131
-
132
- <div class="method-heading">
133
- <a href="#M000361" class="method-signature">
134
- <span class="method-name">XML::HTMLParser.new &rarr; parser<br />
135
- </span>
136
- </a>
137
- </div>
138
-
139
- <div class="method-description">
140
- <p>
141
- Create a <a href="HTMLParser.html#M000361">new</a> parser instance with no
142
- pre-determined source.
143
- </p>
144
- <p><a class="source-toggle" href="#"
145
- onclick="toggleCode('M000361-source');return false;">[Source]</a></p>
146
- <div class="method-source-code" id="M000361-source">
147
- <pre>
148
- /*
149
- * call-seq:
150
- * XML::HTMLParser.new -&gt; parser
151
- *
152
- * Create a new parser instance with no pre-determined source.
153
- */
154
- VALUE
155
- ruby_xml_html_parser_new(VALUE class) {
156
-
157
- </pre>
158
- </div>
159
- </div>
160
- </div>
161
-
162
- <div id="method-M000362" class="method-detail">
163
- <a name="M000362"></a>
164
-
165
- <div class="method-heading">
166
- <a href="#M000362" class="method-signature">
167
- <span class="method-name">XML::HTMLParser.string &rarr; parser<br />
168
- </span>
169
- </a>
170
- </div>
171
-
172
- <div class="method-description">
173
- <p>
174
- Create a <a href="HTMLParser.html#M000361">new</a> parser instance that
175
- will <a href="HTMLParser.html#M000363">parse</a> the given <a
176
- href="HTMLParser.html#M000362">string</a>.
177
- </p>
178
- <p><a class="source-toggle" href="#"
179
- onclick="toggleCode('M000362-source');return false;">[Source]</a></p>
180
- <div class="method-source-code" id="M000362-source">
181
- <pre>
182
- /*
183
- * call-seq:
184
- * XML::HTMLParser.string -&gt; parser
185
- *
186
- * Create a new parser instance that will parse the given
187
- * string.
188
- */
189
- VALUE
190
- ruby_xml_html_parser_new_string(VALUE class, VALUE str) {
191
-
192
- </pre>
193
- </div>
194
- </div>
195
- </div>
196
-
197
- <h3 class="section-bar">Public Instance methods</h3>
198
-
199
- <div id="method-M000364" class="method-detail">
200
- <a name="M000364"></a>
201
-
202
- <div class="method-heading">
203
- <a href="#M000364" class="method-signature">
204
- <span class="method-name">parser.context &rarr; context<br />
205
- </span>
206
- </a>
207
- </div>
208
-
209
- <div class="method-description">
210
- <p>
211
- Obtain the <a href="Parser/Context.html">XML::Parser::Context</a>
212
- associated with this parser.
213
- </p>
214
- <p><a class="source-toggle" href="#"
215
- onclick="toggleCode('M000364-source');return false;">[Source]</a></p>
216
- <div class="method-source-code" id="M000364-source">
217
- <pre>
218
- /*
219
- * call-seq:
220
- * parser.context -&gt; context
221
- *
222
- * Obtain the XML::Parser::Context associated with this
223
- * parser.
224
- */
225
- VALUE
226
- ruby_xml_html_parser_context_get(VALUE self) {
227
-
228
- </pre>
229
- </div>
230
- </div>
231
- </div>
232
-
233
- <div id="method-M000363" class="method-detail">
234
- <a name="M000363"></a>
235
-
236
- <div class="method-heading">
237
- <a href="#M000363" class="method-signature">
238
- <span class="method-name">parser.parse &rarr; document<br />
239
- </span>
240
- </a>
241
- </div>
242
-
243
- <div class="method-description">
244
- <p>
245
- Parse the input <a href="../XML.html">XML</a> and create an <a
246
- href="Document.html">XML::Document</a> with it&#8216;s content. If an error
247
- occurs, <a href="Parser/ParseError.html">XML::Parser::ParseError</a> is
248
- thrown.
249
- </p>
250
- <p><a class="source-toggle" href="#"
251
- onclick="toggleCode('M000363-source');return false;">[Source]</a></p>
252
- <div class="method-source-code" id="M000363-source">
253
- <pre>
254
- /*
255
- * call-seq:
256
- * parser.parse -&gt; document
257
- *
258
- * Parse the input XML and create an XML::Document with
259
- * it's content. If an error occurs, XML::Parser::ParseError
260
- * is thrown.
261
- */
262
- VALUE
263
- ruby_xml_html_parser_parse(VALUE self) {
264
-
265
- </pre>
266
- </div>
267
- </div>
268
- </div>
269
-
270
- <div id="method-M000365" class="method-detail">
271
- <a name="M000365"></a>
272
-
273
- <div class="method-heading">
274
- <a href="#M000365" class="method-signature">
275
- <span class="method-name">parser.string &rarr; "string"<br />
276
- </span>
277
- </a>
278
- </div>
279
-
280
- <div class="method-description">
281
- <p>
282
- Obtain the <a href="HTMLParser.html#M000362">string</a> this parser works
283
- with.
284
- </p>
285
- <p><a class="source-toggle" href="#"
286
- onclick="toggleCode('M000365-source');return false;">[Source]</a></p>
287
- <div class="method-source-code" id="M000365-source">
288
- <pre>
289
- /*
290
- * call-seq:
291
- * parser.string -&gt; &quot;string&quot;
292
- *
293
- * Obtain the string this parser works with.
294
- */
295
- VALUE
296
- ruby_xml_html_parser_str_get(VALUE self) {
297
-
298
- </pre>
299
- </div>
300
- </div>
301
- </div>
302
-
303
- <div id="method-M000366" class="method-detail">
304
- <a name="M000366"></a>
305
-
306
- <div class="method-heading">
307
- <a href="#M000366" class="method-signature">
308
- <span class="method-name">parser.string = "string"<br />
309
- </span>
310
- </a>
311
- </div>
312
-
313
- <div class="method-description">
314
- <p>
315
- Set the <a href="HTMLParser.html#M000362">string</a> this parser works
316
- with.
317
- </p>
318
- <p><a class="source-toggle" href="#"
319
- onclick="toggleCode('M000366-source');return false;">[Source]</a></p>
320
- <div class="method-source-code" id="M000366-source">
321
- <pre>
322
- /*
323
- * call-seq:
324
- * parser.string = &quot;string&quot;
325
- *
326
- * Set the string this parser works with.
327
- */
328
- VALUE
329
- ruby_xml_html_parser_str_set(VALUE self, VALUE str) {
330
-
331
- </pre>
332
- </div>
333
- </div>
334
- </div>
335
-
336
-
337
- </div>
338
-
339
-
340
- </div>
341
-
342
-
343
- <div id="validator-badges">
344
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
345
- </div>
346
-
347
- </body>
348
- </html>