coupa-libxml-ruby 1.1.4
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/CHANGES +488 -0
- data/LICENSE +22 -0
- data/README +161 -0
- data/Rakefile +188 -0
- data/doc/css/normal.css +182 -0
- data/doc/img/raze-tiny.png +0 -0
- data/doc/img/red-cube.jpg +0 -0
- data/doc/img/xml-ruby.png +0 -0
- data/doc/index.xml +43 -0
- data/doc/install.xml +77 -0
- data/doc/layout.rhtml +38 -0
- data/doc/layout.xsl +67 -0
- data/doc/license.xml +32 -0
- data/doc/log/changelog.xml +1324 -0
- data/doc/log/changelog.xsl +42 -0
- data/doc/rdoc/classes/LibXML.html +207 -0
- data/doc/rdoc/classes/LibXML/XML.html +407 -0
- data/doc/rdoc/classes/LibXML/XML/Attr.html +521 -0
- data/doc/rdoc/classes/LibXML/XML/AttrDecl.html +360 -0
- data/doc/rdoc/classes/LibXML/XML/Attributes.html +149 -0
- data/doc/rdoc/classes/LibXML/XML/Document.html +460 -0
- data/doc/rdoc/classes/LibXML/XML/Error.html +129 -0
- data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +263 -0
- data/doc/rdoc/classes/LibXML/XML/Namespace.html +248 -0
- data/doc/rdoc/classes/LibXML/XML/Namespaces.html +200 -0
- data/doc/rdoc/classes/LibXML/XML/Node.html +1351 -0
- data/doc/rdoc/classes/LibXML/XML/Parser.html +328 -0
- data/doc/rdoc/classes/LibXML/XML/Reader.html +172 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser.html +232 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser/Callbacks.html +506 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser/VerboseCallbacks.html +555 -0
- data/doc/rdoc/classes/LibXML/XML/XPath.html +111 -0
- data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +162 -0
- data/doc/rdoc/classes/cXMLDtd.html +114 -0
- data/doc/rdoc/classes/cXMLNode.html +114 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/CHANGES.html +794 -0
- data/doc/rdoc/files/LICENSE.html +131 -0
- data/doc/rdoc/files/README.html +343 -0
- data/doc/rdoc/files/ext/libxml/libxml_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_decl_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_cbg_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_encoding_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_error_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_options_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_io_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_namespace_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_namespaces_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_options_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_relaxng_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax2_handler_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_expression_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +101 -0
- data/doc/rdoc/files/lib/libxml/attr_decl_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/attr_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/attributes_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/document_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/error_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/hpricot_rb.html +192 -0
- data/doc/rdoc/files/lib/libxml/html_parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/namespace_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/namespaces_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/node_rb.html +108 -0
- data/doc/rdoc/files/lib/libxml/ns_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/properties_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/reader_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/sax_callbacks_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/sax_parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/tree_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/xpath_object_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml_rb.html +133 -0
- data/doc/rdoc/files/lib/xml/libxml_rb.html +124 -0
- data/doc/rdoc/files/lib/xml_rb.html +134 -0
- data/doc/rdoc/fr_class_index.html +46 -0
- data/doc/rdoc/fr_file_index.html +84 -0
- data/doc/rdoc/fr_method_index.html +155 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/ext/libxml/Makefile +157 -0
- data/ext/libxml/build.log +4 -0
- data/ext/libxml/extconf.h +5 -0
- data/ext/libxml/extconf.rb +278 -0
- data/ext/libxml/libxml.c +77 -0
- data/ext/libxml/libxml.o +0 -0
- data/ext/libxml/libxml_ruby.bundle +0 -0
- data/ext/libxml/mkmf.log +228 -0
- data/ext/libxml/ruby_libxml.h +93 -0
- data/ext/libxml/ruby_xml.c +893 -0
- data/ext/libxml/ruby_xml.h +10 -0
- data/ext/libxml/ruby_xml.o +0 -0
- data/ext/libxml/ruby_xml_attr.c +352 -0
- data/ext/libxml/ruby_xml_attr.h +14 -0
- data/ext/libxml/ruby_xml_attr.o +0 -0
- data/ext/libxml/ruby_xml_attr_decl.c +171 -0
- data/ext/libxml/ruby_xml_attr_decl.h +13 -0
- data/ext/libxml/ruby_xml_attr_decl.o +0 -0
- data/ext/libxml/ruby_xml_attributes.c +277 -0
- data/ext/libxml/ruby_xml_attributes.h +17 -0
- data/ext/libxml/ruby_xml_attributes.o +0 -0
- data/ext/libxml/ruby_xml_cbg.c +86 -0
- data/ext/libxml/ruby_xml_cbg.o +0 -0
- data/ext/libxml/ruby_xml_document.c +1006 -0
- data/ext/libxml/ruby_xml_document.c.old +936 -0
- data/ext/libxml/ruby_xml_document.h +17 -0
- data/ext/libxml/ruby_xml_document.o +0 -0
- data/ext/libxml/ruby_xml_dtd.c +257 -0
- data/ext/libxml/ruby_xml_dtd.h +9 -0
- data/ext/libxml/ruby_xml_dtd.o +0 -0
- data/ext/libxml/ruby_xml_encoding.c +134 -0
- data/ext/libxml/ruby_xml_encoding.h +12 -0
- data/ext/libxml/ruby_xml_encoding.o +0 -0
- data/ext/libxml/ruby_xml_error.c +1004 -0
- data/ext/libxml/ruby_xml_error.h +14 -0
- data/ext/libxml/ruby_xml_error.o +0 -0
- data/ext/libxml/ruby_xml_html_parser.c +92 -0
- data/ext/libxml/ruby_xml_html_parser.h +12 -0
- data/ext/libxml/ruby_xml_html_parser.o +0 -0
- data/ext/libxml/ruby_xml_html_parser_context.c +308 -0
- data/ext/libxml/ruby_xml_html_parser_context.h +12 -0
- data/ext/libxml/ruby_xml_html_parser_context.o +0 -0
- data/ext/libxml/ruby_xml_html_parser_options.c +40 -0
- data/ext/libxml/ruby_xml_html_parser_options.h +12 -0
- data/ext/libxml/ruby_xml_html_parser_options.o +0 -0
- data/ext/libxml/ruby_xml_input_cbg.c +191 -0
- data/ext/libxml/ruby_xml_input_cbg.h +20 -0
- data/ext/libxml/ruby_xml_input_cbg.o +0 -0
- data/ext/libxml/ruby_xml_io.c +30 -0
- data/ext/libxml/ruby_xml_io.h +9 -0
- data/ext/libxml/ruby_xml_io.o +0 -0
- data/ext/libxml/ruby_xml_namespace.c +170 -0
- data/ext/libxml/ruby_xml_namespace.h +12 -0
- data/ext/libxml/ruby_xml_namespace.o +0 -0
- data/ext/libxml/ruby_xml_namespaces.c +295 -0
- data/ext/libxml/ruby_xml_namespaces.h +11 -0
- data/ext/libxml/ruby_xml_namespaces.o +0 -0
- data/ext/libxml/ruby_xml_node.c +1386 -0
- data/ext/libxml/ruby_xml_node.h +13 -0
- data/ext/libxml/ruby_xml_node.o +0 -0
- data/ext/libxml/ruby_xml_parser.c +94 -0
- data/ext/libxml/ruby_xml_parser.h +14 -0
- data/ext/libxml/ruby_xml_parser.o +0 -0
- data/ext/libxml/ruby_xml_parser_context.c +982 -0
- data/ext/libxml/ruby_xml_parser_context.h +12 -0
- data/ext/libxml/ruby_xml_parser_context.o +0 -0
- data/ext/libxml/ruby_xml_parser_options.c +68 -0
- data/ext/libxml/ruby_xml_parser_options.h +14 -0
- data/ext/libxml/ruby_xml_parser_options.o +0 -0
- data/ext/libxml/ruby_xml_reader.c +1002 -0
- data/ext/libxml/ruby_xml_reader.h +14 -0
- data/ext/libxml/ruby_xml_reader.o +0 -0
- data/ext/libxml/ruby_xml_relaxng.c +111 -0
- data/ext/libxml/ruby_xml_relaxng.h +10 -0
- data/ext/libxml/ruby_xml_relaxng.o +0 -0
- data/ext/libxml/ruby_xml_sax2_handler.c +322 -0
- data/ext/libxml/ruby_xml_sax2_handler.h +12 -0
- data/ext/libxml/ruby_xml_sax2_handler.o +0 -0
- data/ext/libxml/ruby_xml_sax_parser.c +137 -0
- data/ext/libxml/ruby_xml_sax_parser.h +12 -0
- data/ext/libxml/ruby_xml_sax_parser.o +0 -0
- data/ext/libxml/ruby_xml_schema.c +159 -0
- data/ext/libxml/ruby_xml_schema.h +11 -0
- data/ext/libxml/ruby_xml_schema.o +0 -0
- data/ext/libxml/ruby_xml_version.h +9 -0
- data/ext/libxml/ruby_xml_xinclude.c +18 -0
- data/ext/libxml/ruby_xml_xinclude.h +13 -0
- data/ext/libxml/ruby_xml_xinclude.o +0 -0
- data/ext/libxml/ruby_xml_xpath.c +107 -0
- data/ext/libxml/ruby_xml_xpath.h +12 -0
- data/ext/libxml/ruby_xml_xpath.o +0 -0
- data/ext/libxml/ruby_xml_xpath_context.c +387 -0
- data/ext/libxml/ruby_xml_xpath_context.h +11 -0
- data/ext/libxml/ruby_xml_xpath_context.o +0 -0
- data/ext/libxml/ruby_xml_xpath_expression.c +83 -0
- data/ext/libxml/ruby_xml_xpath_expression.h +12 -0
- data/ext/libxml/ruby_xml_xpath_expression.o +0 -0
- data/ext/libxml/ruby_xml_xpath_object.c +336 -0
- data/ext/libxml/ruby_xml_xpath_object.h +19 -0
- data/ext/libxml/ruby_xml_xpath_object.o +0 -0
- data/ext/libxml/ruby_xml_xpointer.c +101 -0
- data/ext/libxml/ruby_xml_xpointer.h +13 -0
- data/ext/libxml/ruby_xml_xpointer.o +0 -0
- data/ext/mingw/Rakefile +34 -0
- data/ext/mingw/build.rake +41 -0
- data/ext/vc/libxml_ruby.sln +26 -0
- data/lib/libxml.rb +30 -0
- data/lib/libxml/attr.rb +111 -0
- data/lib/libxml/attr_decl.rb +78 -0
- data/lib/libxml/attributes.rb +12 -0
- data/lib/libxml/document.rb +190 -0
- data/lib/libxml/error.rb +88 -0
- data/lib/libxml/hpricot.rb +76 -0
- data/lib/libxml/html_parser.rb +94 -0
- data/lib/libxml/namespace.rb +60 -0
- data/lib/libxml/namespaces.rb +36 -0
- data/lib/libxml/node.rb +385 -0
- data/lib/libxml/ns.rb +20 -0
- data/lib/libxml/parser.rb +365 -0
- data/lib/libxml/properties.rb +21 -0
- data/lib/libxml/reader.rb +27 -0
- data/lib/libxml/sax_callbacks.rb +178 -0
- data/lib/libxml/sax_parser.rb +56 -0
- data/lib/libxml/tree.rb +27 -0
- data/lib/libxml/xpath_object.rb +14 -0
- data/lib/xml.rb +14 -0
- data/lib/xml/libxml.rb +8 -0
- data/setup.rb +1585 -0
- data/test/etc_doc_to_s.rb +19 -0
- data/test/ets_doc_file.rb +15 -0
- data/test/ets_doc_to_s.rb +21 -0
- data/test/ets_gpx.rb +26 -0
- data/test/ets_node_gc.rb +21 -0
- data/test/ets_test.xml +2 -0
- data/test/ets_tsr.rb +9 -0
- data/test/model/atom.xml +13 -0
- data/test/model/bands.xml +5 -0
- data/test/model/books.xml +146 -0
- data/test/model/merge_bug_data.xml +58 -0
- data/test/model/ruby-lang.html +238 -0
- data/test/model/rubynet.xml +79 -0
- data/test/model/rubynet_project +1 -0
- data/test/model/shiporder.rnc +28 -0
- data/test/model/shiporder.rng +86 -0
- data/test/model/shiporder.xml +23 -0
- data/test/model/shiporder.xsd +31 -0
- data/test/model/soap.xml +27 -0
- data/test/model/xinclude.xml +5 -0
- data/test/tc_attr.rb +170 -0
- data/test/tc_attr_decl.rb +131 -0
- data/test/tc_attributes.rb +133 -0
- data/test/tc_deprecated_require.rb +11 -0
- data/test/tc_document.rb +113 -0
- data/test/tc_document_write.rb +118 -0
- data/test/tc_dtd.rb +123 -0
- data/test/tc_error.rb +136 -0
- data/test/tc_html_parser.rb +138 -0
- data/test/tc_namespace.rb +59 -0
- data/test/tc_namespaces.rb +174 -0
- data/test/tc_node.rb +181 -0
- data/test/tc_node_cdata.rb +49 -0
- data/test/tc_node_comment.rb +30 -0
- data/test/tc_node_copy.rb +40 -0
- data/test/tc_node_edit.rb +158 -0
- data/test/tc_node_text.rb +69 -0
- data/test/tc_node_write.rb +83 -0
- data/test/tc_node_xlink.rb +26 -0
- data/test/tc_parser.rb +330 -0
- data/test/tc_parser_context.rb +186 -0
- data/test/tc_properties.rb +36 -0
- data/test/tc_reader.rb +284 -0
- data/test/tc_relaxng.rb +51 -0
- data/test/tc_sax_parser.rb +274 -0
- data/test/tc_schema.rb +51 -0
- data/test/tc_traversal.rb +220 -0
- data/test/tc_xinclude.rb +19 -0
- data/test/tc_xml.rb +224 -0
- data/test/tc_xpath.rb +193 -0
- data/test/tc_xpath_context.rb +78 -0
- data/test/tc_xpath_expression.rb +35 -0
- data/test/tc_xpointer.rb +72 -0
- data/test/test_suite.rb +33 -0
- metadata +376 -0
|
@@ -0,0 +1,131 @@
|
|
|
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>File: LICENSE</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="fileHeader">
|
|
50
|
+
<h1>LICENSE</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>LICENSE
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Mon Apr 12 16:42:52 -0700 2010</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
<div id="description">
|
|
72
|
+
<pre>
|
|
73
|
+
Copyright (c) 2008-2009 Charlie Savage and contributors
|
|
74
|
+
Copyright (c) 2002-2007 Sean Chittenden and contributors
|
|
75
|
+
Copyright (c) 2001 Wai-Sun "Squidster" Chia
|
|
76
|
+
</pre>
|
|
77
|
+
<p>
|
|
78
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
79
|
+
copy of this software and associated documentation files (the
|
|
80
|
+
"Software"), to deal in the Software without restriction,
|
|
81
|
+
including without limitation the rights to use, copy, modify, merge,
|
|
82
|
+
publish, distribute, sublicense, and/or sell copies of the Software, and to
|
|
83
|
+
permit persons to whom the Software is furnished to do so, subject to the
|
|
84
|
+
following conditions:
|
|
85
|
+
</p>
|
|
86
|
+
<p>
|
|
87
|
+
The above copyright notice and this permission notice shall be included in
|
|
88
|
+
all copies or substantial portions of the Software.
|
|
89
|
+
</p>
|
|
90
|
+
<p>
|
|
91
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
92
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
93
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
94
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
95
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
96
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
97
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
98
|
+
</p>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<!-- if includes -->
|
|
110
|
+
|
|
111
|
+
<div id="section">
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
<!-- if method_list -->
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
<div id="validator-badges">
|
|
127
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
</body>
|
|
131
|
+
</html>
|
|
@@ -0,0 +1,343 @@
|
|
|
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>File: README</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="fileHeader">
|
|
50
|
+
<h1>README</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>README
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Mon Apr 12 16:42:52 -0700 2010</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
<div id="description">
|
|
72
|
+
<h1><a href="../classes/LibXML.html">LibXML</a> Ruby</h1>
|
|
73
|
+
<h2>Overview</h2>
|
|
74
|
+
<p>
|
|
75
|
+
The libxml gem provides Ruby language bindings for GNOME‘s Libxml2
|
|
76
|
+
XML toolkit. It is free software, released under the MIT License.
|
|
77
|
+
</p>
|
|
78
|
+
<p>
|
|
79
|
+
We think libxml-ruby is the best XML library for Ruby because:
|
|
80
|
+
</p>
|
|
81
|
+
<ul>
|
|
82
|
+
<li>Speed - Its much faster than REXML and Hpricot
|
|
83
|
+
|
|
84
|
+
</li>
|
|
85
|
+
<li>Features - It provides an amazing number of featues
|
|
86
|
+
|
|
87
|
+
</li>
|
|
88
|
+
<li>Conformance - It passes all 1800+ tests from the OASIS XML Tests Suite
|
|
89
|
+
|
|
90
|
+
</li>
|
|
91
|
+
</ul>
|
|
92
|
+
<h2>Requirements</h2>
|
|
93
|
+
<p>
|
|
94
|
+
libxml-ruby requires Ruby 1.8.4 or higher. It is dependent on the following
|
|
95
|
+
libraries to function properly:
|
|
96
|
+
</p>
|
|
97
|
+
<ul>
|
|
98
|
+
<li>libm (math routines: very standard)
|
|
99
|
+
|
|
100
|
+
</li>
|
|
101
|
+
<li>libz (zlib)
|
|
102
|
+
|
|
103
|
+
</li>
|
|
104
|
+
<li>libiconv
|
|
105
|
+
|
|
106
|
+
</li>
|
|
107
|
+
<li>libxml2
|
|
108
|
+
|
|
109
|
+
</li>
|
|
110
|
+
</ul>
|
|
111
|
+
<p>
|
|
112
|
+
If you are running Linux or Unix you‘ll need a C compiler so the
|
|
113
|
+
extension can be compiled when it is installed. If you are running Windows,
|
|
114
|
+
then install the Windows specific RubyGem which includes an already built
|
|
115
|
+
extension.
|
|
116
|
+
</p>
|
|
117
|
+
<h2>INSTALLATION</h2>
|
|
118
|
+
<p>
|
|
119
|
+
The easiest way to install libxml-ruby is via Ruby Gems. To install:
|
|
120
|
+
</p>
|
|
121
|
+
<p>
|
|
122
|
+
<tt>gem install libxml-ruby</tt>
|
|
123
|
+
</p>
|
|
124
|
+
<p>
|
|
125
|
+
If you are running Windows, make sure to install the Win32 RubyGem which
|
|
126
|
+
includes an already built binary file. The binary is built against libxml2
|
|
127
|
+
version 2.7.2 and iconv version 1.11. Both of these are also included as
|
|
128
|
+
pre-built binaries, and should be put either in the libxml/lib directory or
|
|
129
|
+
on the Windows path. Due to a bug in ruby-gems, you cannot install the gem
|
|
130
|
+
to a path that contains spaces (see <a
|
|
131
|
+
href="http://rubyforge.org/tracker/?func=detail&aid=23003&group_id=126&atid=577">rubyforge.org/tracker/?func=detail&aid=23003&group_id=126&atid=577</a>).
|
|
132
|
+
</p>
|
|
133
|
+
<p>
|
|
134
|
+
The Windows binaries are built with MingW and include libxml-ruby, libxml2
|
|
135
|
+
and iconv. The gem also includes a Microsoft VC++ 2008 solution. If you
|
|
136
|
+
wish to run a debug version of libxml-ruby on Windows, then it is highly
|
|
137
|
+
recommended you use VC++.
|
|
138
|
+
</p>
|
|
139
|
+
<h2>Getting Started</h2>
|
|
140
|
+
<p>
|
|
141
|
+
Using libxml is easy. First decide what parser you want to use:
|
|
142
|
+
</p>
|
|
143
|
+
<ul>
|
|
144
|
+
<li>Generally you‘ll want to use the <a
|
|
145
|
+
href="../classes/LibXML/XML/Parser.html">LibXML::XML::Parser</a> which
|
|
146
|
+
provides a tree based API.
|
|
147
|
+
|
|
148
|
+
</li>
|
|
149
|
+
<li>For larger documents that don‘t fit into memory, or if you prefer an
|
|
150
|
+
input based API, use the <a
|
|
151
|
+
href="../classes/LibXML/XML/Reader.html">LibXML::XML::Reader</a>.
|
|
152
|
+
|
|
153
|
+
</li>
|
|
154
|
+
<li>To parse HTML files use <a
|
|
155
|
+
href="../classes/LibXML/XML/HTMLParser.html">LibXML::XML::HTMLParser</a>.
|
|
156
|
+
|
|
157
|
+
</li>
|
|
158
|
+
<li>If you are masochistic, then use the <a
|
|
159
|
+
href="../classes/LibXML/XML/SaxParser.html">LibXML::XML::SaxParser</a>,
|
|
160
|
+
which provides a callback API.
|
|
161
|
+
|
|
162
|
+
</li>
|
|
163
|
+
</ul>
|
|
164
|
+
<p>
|
|
165
|
+
Once you have choosen a parser, choose a datasource. Libxml can parse
|
|
166
|
+
files, strings, URIs and IO streams. For each data source you can specify
|
|
167
|
+
an LibXML::XML::Encoding, a base uri and various parser options. For more
|
|
168
|
+
information, refer the LibXML::XML::Parser.document,
|
|
169
|
+
LibXML::XML::Parser.file, LibXML::XML::Parser.io or <a
|
|
170
|
+
href="../classes/LibXML.html">LibXML</a>:::XML::Parser.string methods (the
|
|
171
|
+
same methods are defined on all four parser classes).
|
|
172
|
+
</p>
|
|
173
|
+
<h2>Advanced Functionality</h2>
|
|
174
|
+
<p>
|
|
175
|
+
Beyond the basics of parsing and processing XML and HTML documents, libxml
|
|
176
|
+
provides a wealth of additional functionality.
|
|
177
|
+
</p>
|
|
178
|
+
<p>
|
|
179
|
+
Most commonly, you‘ll want to use its <a
|
|
180
|
+
href="../classes/LibXML/XML/XPath.html">LibXML::XML::XPath</a> support,
|
|
181
|
+
which makes it easy to find data inside a XML document. Although not as
|
|
182
|
+
popular, LibXML::XML::XPointer provides another API for finding data inside
|
|
183
|
+
an XML document.
|
|
184
|
+
</p>
|
|
185
|
+
<p>
|
|
186
|
+
Often times you‘ll need to validate data before processing it. For
|
|
187
|
+
example, if you accept user generated content submitted over the Web,
|
|
188
|
+
you‘ll want to verify that it does not contain malicious code such as
|
|
189
|
+
embedded scripts. This can be done using libxml‘s powerful set of
|
|
190
|
+
validators:
|
|
191
|
+
</p>
|
|
192
|
+
<ul>
|
|
193
|
+
<li>DTDs (LibXML::XML::Dtd)
|
|
194
|
+
|
|
195
|
+
</li>
|
|
196
|
+
<li>Relax Schemas (LibXML::XML::RelaxNG)
|
|
197
|
+
|
|
198
|
+
</li>
|
|
199
|
+
<li>XML Schema (LibXML::XML::Schema)
|
|
200
|
+
|
|
201
|
+
</li>
|
|
202
|
+
</ul>
|
|
203
|
+
<p>
|
|
204
|
+
Finally, if you‘d like to use XSL Transformations to process data,
|
|
205
|
+
then install the libxslt gem which is available at <a
|
|
206
|
+
href="http://rubyforge.org/projects/libxsl">rubyforge.org/projects/libxsl</a>/.
|
|
207
|
+
</p>
|
|
208
|
+
<h2>Usage</h2>
|
|
209
|
+
<p>
|
|
210
|
+
For in-depth information about using libxml-ruby please refer to its online
|
|
211
|
+
Rdoc documentation.
|
|
212
|
+
</p>
|
|
213
|
+
<p>
|
|
214
|
+
All libxml classes are in the <a
|
|
215
|
+
href="../classes/LibXML/XML.html">LibXML::XML</a> module. The easiest way
|
|
216
|
+
to use libxml is to require ‘xml’. This will mixin the <a
|
|
217
|
+
href="../classes/LibXML.html">LibXML</a> module into the global namespace,
|
|
218
|
+
allowing you to write code like this:
|
|
219
|
+
</p>
|
|
220
|
+
<pre>
|
|
221
|
+
require 'xml'
|
|
222
|
+
document = XML::Document.new
|
|
223
|
+
</pre>
|
|
224
|
+
<p>
|
|
225
|
+
However, when creating an application or library you plan to redistribute,
|
|
226
|
+
it is best to not add the <a href="../classes/LibXML.html">LibXML</a>
|
|
227
|
+
module to the global namespace, in which case you can either write your
|
|
228
|
+
code like this:
|
|
229
|
+
</p>
|
|
230
|
+
<pre>
|
|
231
|
+
require 'libxml'
|
|
232
|
+
document = LibXML::XML::Document.new
|
|
233
|
+
</pre>
|
|
234
|
+
<p>
|
|
235
|
+
Or you can utilize a namespace for you own work and include <a
|
|
236
|
+
href="../classes/LibXML.html">LibXML</a> into it. For example:
|
|
237
|
+
</p>
|
|
238
|
+
<pre>
|
|
239
|
+
require 'libxml'
|
|
240
|
+
|
|
241
|
+
mdoule MyApplication
|
|
242
|
+
include LibXML
|
|
243
|
+
|
|
244
|
+
class MyClass
|
|
245
|
+
def some_method
|
|
246
|
+
document = XML::Document.new
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
</pre>
|
|
251
|
+
<p>
|
|
252
|
+
For simplicity‘s sake, the documentation uses the xml module in its
|
|
253
|
+
examples.
|
|
254
|
+
</p>
|
|
255
|
+
<h2>Performance</h2>
|
|
256
|
+
<p>
|
|
257
|
+
In addition to being feature rich and conformation, the main reason people
|
|
258
|
+
use libxml-ruby is for performance. Here are the results of a couple simple
|
|
259
|
+
benchmarks recently blogged about on the Web (you can find them in the
|
|
260
|
+
benchmark directory of the libxml distribution).
|
|
261
|
+
</p>
|
|
262
|
+
<p>
|
|
263
|
+
From <a
|
|
264
|
+
href="http://depixelate.com/2008/4/23/ruby-xml-parsing-benchmarks">depixelate.com/2008/4/23/ruby-xml-parsing-benchmarks</a>
|
|
265
|
+
</p>
|
|
266
|
+
<pre>
|
|
267
|
+
user system total real
|
|
268
|
+
libxml 0.032000 0.000000 0.032000 ( 0.031000)
|
|
269
|
+
Hpricot 0.640000 0.031000 0.671000 ( 0.890000)
|
|
270
|
+
REXML 1.813000 0.047000 1.860000 ( 2.031000)
|
|
271
|
+
</pre>
|
|
272
|
+
<p>
|
|
273
|
+
From <a
|
|
274
|
+
href="https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks">svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks</a>/
|
|
275
|
+
</p>
|
|
276
|
+
<pre>
|
|
277
|
+
user system total real
|
|
278
|
+
libxml 0.641000 0.031000 0.672000 ( 0.672000)
|
|
279
|
+
hpricot 5.359000 0.062000 5.421000 ( 5.516000)
|
|
280
|
+
rexml 22.859000 0.047000 22.906000 ( 23.203000)
|
|
281
|
+
</pre>
|
|
282
|
+
<h2>Documentation</h2>
|
|
283
|
+
<p>
|
|
284
|
+
Documentation is provided via rdoc. To generate the documentation, run the
|
|
285
|
+
the command ‘rake doc’. libxml-ruby‘s online
|
|
286
|
+
documentation is generated using Hanna. To use hanna:
|
|
287
|
+
</p>
|
|
288
|
+
<pre>
|
|
289
|
+
gem install mislav-hanna
|
|
290
|
+
rake rdoc RDOCOPT="-S -T hanna"
|
|
291
|
+
</pre>
|
|
292
|
+
<p>
|
|
293
|
+
Note that older versions of Rdoc, which ship with Ruby 1.8.x, will report a
|
|
294
|
+
number of errors. To avoid them, install Rdoc 2.1 or higher from RubyForge
|
|
295
|
+
(<a href="http://rdoc.rubyforge.org">rdoc.rubyforge.org</a>/). Once you
|
|
296
|
+
have installed the gem, you‘ll have to disable the version of Rdoc
|
|
297
|
+
that Ruby 1.8.x includes. An easy way to do that is rename the directory
|
|
298
|
+
uby/lib/ruby/1.8/rdoc to ruby/lib/ruby/1.8/rdoc_old.
|
|
299
|
+
</p>
|
|
300
|
+
<h2>Support</h2>
|
|
301
|
+
<p>
|
|
302
|
+
If you have any questions about using libxml-ruby, please send them to
|
|
303
|
+
libxml-devel@rubyforge.org. If you have found any bugs in libxml-devel, or
|
|
304
|
+
have developed new patches, please submit them to Ruby Forge at <a
|
|
305
|
+
href="http://rubyforge.org/tracker/?group_id=494">rubyforge.org/tracker/?group_id=494</a>.
|
|
306
|
+
</p>
|
|
307
|
+
<h2>License</h2>
|
|
308
|
+
<p>
|
|
309
|
+
See LICENSE for license information.
|
|
310
|
+
</p>
|
|
311
|
+
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
</div>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
<!-- if includes -->
|
|
322
|
+
|
|
323
|
+
<div id="section">
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
<!-- if method_list -->
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
<div id="validator-badges">
|
|
339
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
340
|
+
</div>
|
|
341
|
+
|
|
342
|
+
</body>
|
|
343
|
+
</html>
|