libxml-ruby 2.9.0 → 3.0.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.
- checksums.yaml +4 -4
 - data/HISTORY +811 -790
 - data/LICENSE +20 -20
 - data/MANIFEST +166 -166
 - data/README.rdoc +188 -184
 - data/Rakefile +1 -1
 - data/ext/libxml/libxml.c +80 -80
 - data/ext/libxml/ruby_libxml.h +75 -75
 - data/ext/libxml/ruby_xml.c +0 -84
 - data/ext/libxml/ruby_xml.h +0 -10
 - data/ext/libxml/ruby_xml_attr.h +12 -12
 - data/ext/libxml/ruby_xml_attr_decl.c +153 -153
 - data/ext/libxml/ruby_xml_attr_decl.h +11 -11
 - data/ext/libxml/ruby_xml_attributes.c +275 -275
 - data/ext/libxml/ruby_xml_attributes.h +15 -15
 - data/ext/libxml/ruby_xml_document.c +21 -27
 - data/ext/libxml/ruby_xml_document.h +11 -11
 - data/ext/libxml/ruby_xml_dtd.c +2 -13
 - data/ext/libxml/ruby_xml_dtd.h +9 -9
 - data/ext/libxml/ruby_xml_error.c +996 -996
 - data/ext/libxml/ruby_xml_error.h +12 -12
 - data/ext/libxml/ruby_xml_html_parser.c +89 -92
 - data/ext/libxml/ruby_xml_html_parser.h +10 -10
 - data/ext/libxml/ruby_xml_html_parser_context.h +10 -10
 - data/ext/libxml/ruby_xml_html_parser_options.c +46 -46
 - data/ext/libxml/ruby_xml_html_parser_options.h +10 -10
 - data/ext/libxml/ruby_xml_input_cbg.h +20 -20
 - data/ext/libxml/ruby_xml_io.c +0 -1
 - data/ext/libxml/ruby_xml_io.h +10 -10
 - data/ext/libxml/ruby_xml_namespace.c +153 -153
 - data/ext/libxml/ruby_xml_namespace.h +10 -10
 - data/ext/libxml/ruby_xml_namespaces.c +293 -293
 - data/ext/libxml/ruby_xml_namespaces.h +9 -9
 - data/ext/libxml/ruby_xml_node.c +100 -143
 - data/ext/libxml/ruby_xml_node.h +13 -11
 - data/ext/libxml/ruby_xml_parser.c +91 -94
 - data/ext/libxml/ruby_xml_parser.h +12 -12
 - data/ext/libxml/ruby_xml_parser_context.h +10 -10
 - data/ext/libxml/ruby_xml_parser_options.c +66 -66
 - data/ext/libxml/ruby_xml_parser_options.h +12 -12
 - data/ext/libxml/ruby_xml_reader.c +45 -37
 - data/ext/libxml/ruby_xml_reader.h +17 -17
 - data/ext/libxml/ruby_xml_relaxng.h +10 -10
 - data/ext/libxml/ruby_xml_sax2_handler.c +3 -3
 - data/ext/libxml/ruby_xml_sax2_handler.h +10 -10
 - data/ext/libxml/ruby_xml_sax_parser.c +116 -120
 - data/ext/libxml/ruby_xml_sax_parser.h +10 -10
 - data/ext/libxml/ruby_xml_schema.h +809 -809
 - data/ext/libxml/ruby_xml_schema_attribute.c +109 -109
 - data/ext/libxml/ruby_xml_schema_attribute.h +15 -15
 - data/ext/libxml/ruby_xml_schema_element.c +94 -94
 - data/ext/libxml/ruby_xml_schema_element.h +14 -14
 - data/ext/libxml/ruby_xml_schema_facet.c +52 -52
 - data/ext/libxml/ruby_xml_schema_facet.h +13 -13
 - data/ext/libxml/ruby_xml_schema_type.c +259 -259
 - data/ext/libxml/ruby_xml_schema_type.h +9 -9
 - data/ext/libxml/ruby_xml_version.h +9 -9
 - data/ext/libxml/ruby_xml_writer.c +1136 -1136
 - data/ext/libxml/ruby_xml_writer.h +10 -10
 - data/ext/libxml/ruby_xml_xinclude.c +16 -16
 - data/ext/libxml/ruby_xml_xinclude.h +11 -11
 - data/ext/libxml/ruby_xml_xpath.c +42 -36
 - data/ext/libxml/ruby_xml_xpath.h +13 -13
 - data/ext/libxml/ruby_xml_xpath_context.c +1 -1
 - data/ext/libxml/ruby_xml_xpath_context.h +9 -9
 - data/ext/libxml/ruby_xml_xpath_expression.c +81 -81
 - data/ext/libxml/ruby_xml_xpath_expression.h +10 -10
 - data/ext/libxml/ruby_xml_xpath_object.c +5 -2
 - data/ext/libxml/ruby_xml_xpath_object.h +17 -17
 - data/ext/libxml/ruby_xml_xpointer.c +99 -99
 - data/ext/libxml/ruby_xml_xpointer.h +11 -11
 - data/ext/vc/libxml_ruby.sln +17 -15
 - data/lib/libxml.rb +1 -6
 - data/lib/libxml/node.rb +2 -78
 - data/lib/libxml/parser.rb +0 -266
 - data/lib/libxml/sax_parser.rb +0 -17
 - data/lib/libxml/schema.rb +66 -66
 - data/lib/libxml/schema/attribute.rb +19 -19
 - data/lib/libxml/schema/element.rb +27 -27
 - data/lib/libxml/schema/type.rb +29 -29
 - data/script/benchmark/depixelate +634 -634
 - data/script/benchmark/hamlet.xml +9054 -9054
 - data/script/benchmark/parsecount +170 -170
 - data/script/benchmark/throughput +41 -41
 - data/script/test +6 -6
 - data/test/c14n/given/example-1.xml +14 -14
 - data/test/c14n/given/example-2.xml +11 -11
 - data/test/c14n/given/example-3.xml +18 -18
 - data/test/c14n/given/example-4.xml +9 -9
 - data/test/c14n/given/example-5.xml +12 -12
 - data/test/c14n/given/example-6.xml +2 -2
 - data/test/c14n/given/example-7.xml +11 -11
 - data/test/c14n/given/example-8.xml +11 -11
 - data/test/c14n/given/example-8.xpath +9 -9
 - data/test/c14n/result/1-1-without-comments/example-1 +3 -3
 - data/test/c14n/result/1-1-without-comments/example-2 +10 -10
 - data/test/c14n/result/1-1-without-comments/example-3 +13 -13
 - data/test/c14n/result/1-1-without-comments/example-4 +8 -8
 - data/test/c14n/result/1-1-without-comments/example-5 +2 -2
 - data/test/c14n/result/with-comments/example-1 +5 -5
 - data/test/c14n/result/with-comments/example-2 +10 -10
 - data/test/c14n/result/with-comments/example-3 +13 -13
 - data/test/c14n/result/with-comments/example-4 +8 -8
 - data/test/c14n/result/with-comments/example-5 +3 -3
 - data/test/c14n/result/without-comments/example-1 +3 -3
 - data/test/c14n/result/without-comments/example-2 +10 -10
 - data/test/c14n/result/without-comments/example-3 +13 -13
 - data/test/c14n/result/without-comments/example-4 +8 -8
 - data/test/c14n/result/without-comments/example-5 +2 -2
 - data/test/model/atom.xml +12 -12
 - data/test/model/bands.iso-8859-1.xml +4 -4
 - data/test/model/bands.utf-8.xml +4 -4
 - data/test/model/bands.xml +4 -4
 - data/test/model/books.xml +153 -153
 - data/test/model/merge_bug_data.xml +58 -58
 - data/test/model/ruby-lang.html +238 -238
 - data/test/model/rubynet.xml +79 -79
 - data/test/model/shiporder.rnc +28 -28
 - data/test/model/shiporder.rng +86 -86
 - data/test/model/shiporder.xml +22 -22
 - data/test/model/shiporder.xsd +39 -39
 - data/test/model/soap.xml +27 -27
 - data/test/model/xinclude.xml +4 -4
 - data/test/tc_attributes.rb +0 -6
 - data/test/tc_error.rb +157 -158
 - data/test/tc_node.rb +33 -17
 - data/test/tc_node_edit.rb +0 -15
 - data/test/tc_node_pi.rb +39 -39
 - data/test/tc_parser.rb +0 -48
 - data/test/tc_reader.rb +12 -53
 - data/test/tc_writer.rb +447 -447
 - data/test/tc_xpath.rb +1 -1
 - data/test/test_helper.rb +2 -2
 - metadata +3 -8
 - data/ext/libxml/extconf.h +0 -4
 - data/lib/libxml/ns.rb +0 -22
 - data/lib/libxml/properties.rb +0 -23
 - data/lib/libxml/reader.rb +0 -29
 - data/lib/libxml/xpath_object.rb +0 -16
 
    
        data/LICENSE
    CHANGED
    
    | 
         @@ -1,21 +1,21 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
              Copyright (c) 2008-2013 Charlie Savage and contributors
         
     | 
| 
       2 
     | 
    
         
            -
              Copyright (c) 2002-2007 Sean Chittenden and contributors
         
     | 
| 
       3 
     | 
    
         
            -
              Copyright (c) 2001 Wai-Sun "Squidster" Chia
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            Permission is hereby granted, free of charge, to any person obtaining a copy of
         
     | 
| 
       6 
     | 
    
         
            -
            this software and associated documentation files (the "Software"), to deal in 
         
     | 
| 
       7 
     | 
    
         
            -
            the Software without restriction, including without limitation the rights to 
         
     | 
| 
       8 
     | 
    
         
            -
            use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
         
     | 
| 
       9 
     | 
    
         
            -
            of the Software, and to permit persons to whom the Software is furnished to do
         
     | 
| 
       10 
     | 
    
         
            -
            so, subject to the following conditions:
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
            The above copyright notice and this permission notice shall be included in all
         
     | 
| 
       13 
     | 
    
         
            -
            copies or substantial portions of the Software.
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
         
     | 
| 
       16 
     | 
    
         
            -
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
         
     | 
| 
       17 
     | 
    
         
            -
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
         
     | 
| 
       18 
     | 
    
         
            -
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
         
     | 
| 
       19 
     | 
    
         
            -
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         
     | 
| 
       20 
     | 
    
         
            -
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         
     | 
| 
      
 1 
     | 
    
         
            +
              Copyright (c) 2008-2013 Charlie Savage and contributors
         
     | 
| 
      
 2 
     | 
    
         
            +
              Copyright (c) 2002-2007 Sean Chittenden and contributors
         
     | 
| 
      
 3 
     | 
    
         
            +
              Copyright (c) 2001 Wai-Sun "Squidster" Chia
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining a copy of
         
     | 
| 
      
 6 
     | 
    
         
            +
            this software and associated documentation files (the "Software"), to deal in 
         
     | 
| 
      
 7 
     | 
    
         
            +
            the Software without restriction, including without limitation the rights to 
         
     | 
| 
      
 8 
     | 
    
         
            +
            use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
         
     | 
| 
      
 9 
     | 
    
         
            +
            of the Software, and to permit persons to whom the Software is furnished to do
         
     | 
| 
      
 10 
     | 
    
         
            +
            so, subject to the following conditions:
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be included in all
         
     | 
| 
      
 13 
     | 
    
         
            +
            copies or substantial portions of the Software.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
         
     | 
| 
      
 16 
     | 
    
         
            +
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
         
     | 
| 
      
 17 
     | 
    
         
            +
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
         
     | 
| 
      
 18 
     | 
    
         
            +
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
         
     | 
| 
      
 19 
     | 
    
         
            +
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         
     | 
| 
      
 20 
     | 
    
         
            +
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         
     | 
| 
       21 
21 
     | 
    
         
             
            SOFTWARE.
         
     | 
    
        data/MANIFEST
    CHANGED
    
    | 
         @@ -1,166 +1,166 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #!mast -x doc/libxml-ruby/rdoc -i .gitignore ext doc lib script test [A-Z]*
         
     | 
| 
       2 
     | 
    
         
            -
            ext/libxml/extconf.rb
         
     | 
| 
       3 
     | 
    
         
            -
            ext/libxml/libxml.c
         
     | 
| 
       4 
     | 
    
         
            -
            ext/libxml/ruby_libxml.h
         
     | 
| 
       5 
     | 
    
         
            -
            ext/libxml/ruby_xml.c
         
     | 
| 
       6 
     | 
    
         
            -
            ext/libxml/ruby_xml.h
         
     | 
| 
       7 
     | 
    
         
            -
            ext/libxml/ruby_xml_attr.c
         
     | 
| 
       8 
     | 
    
         
            -
            ext/libxml/ruby_xml_attr.h
         
     | 
| 
       9 
     | 
    
         
            -
            ext/libxml/ruby_xml_attr_decl.c
         
     | 
| 
       10 
     | 
    
         
            -
            ext/libxml/ruby_xml_attr_decl.h
         
     | 
| 
       11 
     | 
    
         
            -
            ext/libxml/ruby_xml_attributes.c
         
     | 
| 
       12 
     | 
    
         
            -
            ext/libxml/ruby_xml_attributes.h
         
     | 
| 
       13 
     | 
    
         
            -
            ext/libxml/ruby_xml_cbg.c
         
     | 
| 
       14 
     | 
    
         
            -
            ext/libxml/ruby_xml_document.c
         
     | 
| 
       15 
     | 
    
         
            -
            ext/libxml/ruby_xml_document.h
         
     | 
| 
       16 
     | 
    
         
            -
            ext/libxml/ruby_xml_dtd.c
         
     | 
| 
       17 
     | 
    
         
            -
            ext/libxml/ruby_xml_dtd.h
         
     | 
| 
       18 
     | 
    
         
            -
            ext/libxml/ruby_xml_encoding.c
         
     | 
| 
       19 
     | 
    
         
            -
            ext/libxml/ruby_xml_encoding.h
         
     | 
| 
       20 
     | 
    
         
            -
            ext/libxml/ruby_xml_error.c
         
     | 
| 
       21 
     | 
    
         
            -
            ext/libxml/ruby_xml_error.h
         
     | 
| 
       22 
     | 
    
         
            -
            ext/libxml/ruby_xml_html_parser.c
         
     | 
| 
       23 
     | 
    
         
            -
            ext/libxml/ruby_xml_html_parser.h
         
     | 
| 
       24 
     | 
    
         
            -
            ext/libxml/ruby_xml_html_parser_context.c
         
     | 
| 
       25 
     | 
    
         
            -
            ext/libxml/ruby_xml_html_parser_context.h
         
     | 
| 
       26 
     | 
    
         
            -
            ext/libxml/ruby_xml_html_parser_options.c
         
     | 
| 
       27 
     | 
    
         
            -
            ext/libxml/ruby_xml_html_parser_options.h
         
     | 
| 
       28 
     | 
    
         
            -
            ext/libxml/ruby_xml_input_cbg.c
         
     | 
| 
       29 
     | 
    
         
            -
            ext/libxml/ruby_xml_input_cbg.h
         
     | 
| 
       30 
     | 
    
         
            -
            ext/libxml/ruby_xml_io.c
         
     | 
| 
       31 
     | 
    
         
            -
            ext/libxml/ruby_xml_io.h
         
     | 
| 
       32 
     | 
    
         
            -
            ext/libxml/ruby_xml_namespace.c
         
     | 
| 
       33 
     | 
    
         
            -
            ext/libxml/ruby_xml_namespace.h
         
     | 
| 
       34 
     | 
    
         
            -
            ext/libxml/ruby_xml_namespaces.c
         
     | 
| 
       35 
     | 
    
         
            -
            ext/libxml/ruby_xml_namespaces.h
         
     | 
| 
       36 
     | 
    
         
            -
            ext/libxml/ruby_xml_node.c
         
     | 
| 
       37 
     | 
    
         
            -
            ext/libxml/ruby_xml_node.h
         
     | 
| 
       38 
     | 
    
         
            -
            ext/libxml/ruby_xml_parser.c
         
     | 
| 
       39 
     | 
    
         
            -
            ext/libxml/ruby_xml_parser.h
         
     | 
| 
       40 
     | 
    
         
            -
            ext/libxml/ruby_xml_parser_context.c
         
     | 
| 
       41 
     | 
    
         
            -
            ext/libxml/ruby_xml_parser_context.h
         
     | 
| 
       42 
     | 
    
         
            -
            ext/libxml/ruby_xml_parser_options.c
         
     | 
| 
       43 
     | 
    
         
            -
            ext/libxml/ruby_xml_parser_options.h
         
     | 
| 
       44 
     | 
    
         
            -
            ext/libxml/ruby_xml_reader.c
         
     | 
| 
       45 
     | 
    
         
            -
            ext/libxml/ruby_xml_reader.h
         
     | 
| 
       46 
     | 
    
         
            -
            ext/libxml/ruby_xml_relaxng.c
         
     | 
| 
       47 
     | 
    
         
            -
            ext/libxml/ruby_xml_relaxng.h
         
     | 
| 
       48 
     | 
    
         
            -
            ext/libxml/ruby_xml_sax2_handler.c
         
     | 
| 
       49 
     | 
    
         
            -
            ext/libxml/ruby_xml_sax2_handler.h
         
     | 
| 
       50 
     | 
    
         
            -
            ext/libxml/ruby_xml_sax_parser.c
         
     | 
| 
       51 
     | 
    
         
            -
            ext/libxml/ruby_xml_sax_parser.h
         
     | 
| 
       52 
     | 
    
         
            -
            ext/libxml/ruby_xml_schema.c
         
     | 
| 
       53 
     | 
    
         
            -
            ext/libxml/ruby_xml_schema.h
         
     | 
| 
       54 
     | 
    
         
            -
            ext/libxml/ruby_xml_version.h
         
     | 
| 
       55 
     | 
    
         
            -
            ext/libxml/ruby_xml_xinclude.c
         
     | 
| 
       56 
     | 
    
         
            -
            ext/libxml/ruby_xml_xinclude.h
         
     | 
| 
       57 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpath.c
         
     | 
| 
       58 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpath.h
         
     | 
| 
       59 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpath_context.c
         
     | 
| 
       60 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpath_context.h
         
     | 
| 
       61 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpath_expression.c
         
     | 
| 
       62 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpath_expression.h
         
     | 
| 
       63 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpath_object.c
         
     | 
| 
       64 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpath_object.h
         
     | 
| 
       65 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpointer.c
         
     | 
| 
       66 
     | 
    
         
            -
            ext/libxml/ruby_xml_xpointer.h
         
     | 
| 
       67 
     | 
    
         
            -
            ext/mingw/Rakefile
         
     | 
| 
       68 
     | 
    
         
            -
            ext/mingw/build.rake
         
     | 
| 
       69 
     | 
    
         
            -
            ext/mingw/libiconv-2.dll
         
     | 
| 
       70 
     | 
    
         
            -
            ext/mingw/libxml2-2.dll
         
     | 
| 
       71 
     | 
    
         
            -
            ext/mingw/libxml_ruby.dll.a
         
     | 
| 
       72 
     | 
    
         
            -
            ext/mingw/libxml_ruby.so
         
     | 
| 
       73 
     | 
    
         
            -
            ext/vc/libxml_ruby.sln
         
     | 
| 
       74 
     | 
    
         
            -
            ext/vc/libxml_ruby_18/libxml_ruby.vcproj
         
     | 
| 
       75 
     | 
    
         
            -
            ext/vc/libxml_ruby_19/libxml_ruby_19.vcproj
         
     | 
| 
       76 
     | 
    
         
            -
            doc/.htaccess
         
     | 
| 
       77 
     | 
    
         
            -
            doc/.rsync-filter
         
     | 
| 
       78 
     | 
    
         
            -
            lib/libxml/attr.rb
         
     | 
| 
       79 
     | 
    
         
            -
            lib/libxml/attr_decl.rb
         
     | 
| 
       80 
     | 
    
         
            -
            lib/libxml/attributes.rb
         
     | 
| 
       81 
     | 
    
         
            -
            lib/libxml/document.rb
         
     | 
| 
       82 
     | 
    
         
            -
            lib/libxml/error.rb
         
     | 
| 
       83 
     | 
    
         
            -
            lib/libxml/hpricot.rb
         
     | 
| 
       84 
     | 
    
         
            -
            lib/libxml/html_parser.rb
         
     | 
| 
       85 
     | 
    
         
            -
            lib/libxml/namespace.rb
         
     | 
| 
       86 
     | 
    
         
            -
            lib/libxml/namespaces.rb
         
     | 
| 
       87 
     | 
    
         
            -
            lib/libxml/node.rb
         
     | 
| 
       88 
     | 
    
         
            -
            lib/libxml/ns.rb
         
     | 
| 
       89 
     | 
    
         
            -
            lib/libxml/parser.rb
         
     | 
| 
       90 
     | 
    
         
            -
            lib/libxml/properties.rb
         
     | 
| 
       91 
     | 
    
         
            -
            lib/libxml/reader.rb
         
     | 
| 
       92 
     | 
    
         
            -
            lib/libxml/sax_callbacks.rb
         
     | 
| 
       93 
     | 
    
         
            -
            lib/libxml/sax_parser.rb
         
     | 
| 
       94 
     | 
    
         
            -
            lib/libxml/tree.rb
         
     | 
| 
       95 
     | 
    
         
            -
            lib/libxml/xpath_object.rb
         
     | 
| 
       96 
     | 
    
         
            -
            lib/libxml.rb
         
     | 
| 
       97 
     | 
    
         
            -
            lib/xml/libxml.rb
         
     | 
| 
       98 
     | 
    
         
            -
            lib/xml.rb
         
     | 
| 
       99 
     | 
    
         
            -
            script/benchmark/depixelate
         
     | 
| 
       100 
     | 
    
         
            -
            script/benchmark/hamlet.xml
         
     | 
| 
       101 
     | 
    
         
            -
            script/benchmark/parsecount
         
     | 
| 
       102 
     | 
    
         
            -
            script/benchmark/sock_entries.xml
         
     | 
| 
       103 
     | 
    
         
            -
            script/benchmark/throughput
         
     | 
| 
       104 
     | 
    
         
            -
            script/test
         
     | 
| 
       105 
     | 
    
         
            -
            test/etc_doc_to_s.rb
         
     | 
| 
       106 
     | 
    
         
            -
            test/ets_doc_file.rb
         
     | 
| 
       107 
     | 
    
         
            -
            test/ets_doc_to_s.rb
         
     | 
| 
       108 
     | 
    
         
            -
            test/ets_gpx.rb
         
     | 
| 
       109 
     | 
    
         
            -
            test/ets_node_gc.rb
         
     | 
| 
       110 
     | 
    
         
            -
            test/ets_test.xml
         
     | 
| 
       111 
     | 
    
         
            -
            test/ets_tsr.rb
         
     | 
| 
       112 
     | 
    
         
            -
            test/model/atom.xml
         
     | 
| 
       113 
     | 
    
         
            -
            test/model/bands.xml
         
     | 
| 
       114 
     | 
    
         
            -
            test/model/books.xml
         
     | 
| 
       115 
     | 
    
         
            -
            test/model/merge_bug_data.xml
         
     | 
| 
       116 
     | 
    
         
            -
            test/model/ruby-lang.html
         
     | 
| 
       117 
     | 
    
         
            -
            test/model/rubynet.xml
         
     | 
| 
       118 
     | 
    
         
            -
            test/model/rubynet_project
         
     | 
| 
       119 
     | 
    
         
            -
            test/model/shiporder.rnc
         
     | 
| 
       120 
     | 
    
         
            -
            test/model/shiporder.rng
         
     | 
| 
       121 
     | 
    
         
            -
            test/model/shiporder.xml
         
     | 
| 
       122 
     | 
    
         
            -
            test/model/shiporder.xsd
         
     | 
| 
       123 
     | 
    
         
            -
            test/model/soap.xml
         
     | 
| 
       124 
     | 
    
         
            -
            test/model/xinclude.xml
         
     | 
| 
       125 
     | 
    
         
            -
            test/tc_attr.rb
         
     | 
| 
       126 
     | 
    
         
            -
            test/tc_attr_decl.rb
         
     | 
| 
       127 
     | 
    
         
            -
            test/tc_attributes.rb
         
     | 
| 
       128 
     | 
    
         
            -
            test/tc_deprecated_require.rb
         
     | 
| 
       129 
     | 
    
         
            -
            test/tc_document.rb
         
     | 
| 
       130 
     | 
    
         
            -
            test/tc_document_write.rb
         
     | 
| 
       131 
     | 
    
         
            -
            test/tc_dtd.rb
         
     | 
| 
       132 
     | 
    
         
            -
            test/tc_error.rb
         
     | 
| 
       133 
     | 
    
         
            -
            test/tc_html_parser.rb
         
     | 
| 
       134 
     | 
    
         
            -
            test/tc_namespace.rb
         
     | 
| 
       135 
     | 
    
         
            -
            test/tc_namespaces.rb
         
     | 
| 
       136 
     | 
    
         
            -
            test/tc_node.rb
         
     | 
| 
       137 
     | 
    
         
            -
            test/tc_node_cdata.rb
         
     | 
| 
       138 
     | 
    
         
            -
            test/tc_node_comment.rb
         
     | 
| 
       139 
     | 
    
         
            -
            test/tc_node_copy.rb
         
     | 
| 
       140 
     | 
    
         
            -
            test/tc_node_edit.rb
         
     | 
| 
       141 
     | 
    
         
            -
            test/tc_node_pi.rb
         
     | 
| 
       142 
     | 
    
         
            -
            test/tc_node_text.rb
         
     | 
| 
       143 
     | 
    
         
            -
            test/tc_node_write.rb
         
     | 
| 
       144 
     | 
    
         
            -
            test/tc_node_xlink.rb
         
     | 
| 
       145 
     | 
    
         
            -
            test/tc_parser.rb
         
     | 
| 
       146 
     | 
    
         
            -
            test/tc_parser_context.rb
         
     | 
| 
       147 
     | 
    
         
            -
            test/tc_properties.rb
         
     | 
| 
       148 
     | 
    
         
            -
            test/tc_reader.rb
         
     | 
| 
       149 
     | 
    
         
            -
            test/tc_relaxng.rb
         
     | 
| 
       150 
     | 
    
         
            -
            test/tc_sax_parser.rb
         
     | 
| 
       151 
     | 
    
         
            -
            test/tc_schema.rb
         
     | 
| 
       152 
     | 
    
         
            -
            test/tc_traversal.rb
         
     | 
| 
       153 
     | 
    
         
            -
            test/tc_xinclude.rb
         
     | 
| 
       154 
     | 
    
         
            -
            test/tc_xml.rb
         
     | 
| 
       155 
     | 
    
         
            -
            test/tc_xpath.rb
         
     | 
| 
       156 
     | 
    
         
            -
            test/tc_xpath_context.rb
         
     | 
| 
       157 
     | 
    
         
            -
            test/tc_xpath_expression.rb
         
     | 
| 
       158 
     | 
    
         
            -
            test/tc_xpointer.rb
         
     | 
| 
       159 
     | 
    
         
            -
            test/test_suite.rb
         
     | 
| 
       160 
     | 
    
         
            -
            Rakefile
         
     | 
| 
       161 
     | 
    
         
            -
            HISTORY.rdoc
         
     | 
| 
       162 
     | 
    
         
            -
            PROFILE
         
     | 
| 
       163 
     | 
    
         
            -
            TODO
         
     | 
| 
       164 
     | 
    
         
            -
            LICENSE
         
     | 
| 
       165 
     | 
    
         
            -
            README.rdoc
         
     | 
| 
       166 
     | 
    
         
            -
            VERSION
         
     | 
| 
      
 1 
     | 
    
         
            +
            #!mast -x doc/libxml-ruby/rdoc -i .gitignore ext doc lib script test [A-Z]*
         
     | 
| 
      
 2 
     | 
    
         
            +
            ext/libxml/extconf.rb
         
     | 
| 
      
 3 
     | 
    
         
            +
            ext/libxml/libxml.c
         
     | 
| 
      
 4 
     | 
    
         
            +
            ext/libxml/ruby_libxml.h
         
     | 
| 
      
 5 
     | 
    
         
            +
            ext/libxml/ruby_xml.c
         
     | 
| 
      
 6 
     | 
    
         
            +
            ext/libxml/ruby_xml.h
         
     | 
| 
      
 7 
     | 
    
         
            +
            ext/libxml/ruby_xml_attr.c
         
     | 
| 
      
 8 
     | 
    
         
            +
            ext/libxml/ruby_xml_attr.h
         
     | 
| 
      
 9 
     | 
    
         
            +
            ext/libxml/ruby_xml_attr_decl.c
         
     | 
| 
      
 10 
     | 
    
         
            +
            ext/libxml/ruby_xml_attr_decl.h
         
     | 
| 
      
 11 
     | 
    
         
            +
            ext/libxml/ruby_xml_attributes.c
         
     | 
| 
      
 12 
     | 
    
         
            +
            ext/libxml/ruby_xml_attributes.h
         
     | 
| 
      
 13 
     | 
    
         
            +
            ext/libxml/ruby_xml_cbg.c
         
     | 
| 
      
 14 
     | 
    
         
            +
            ext/libxml/ruby_xml_document.c
         
     | 
| 
      
 15 
     | 
    
         
            +
            ext/libxml/ruby_xml_document.h
         
     | 
| 
      
 16 
     | 
    
         
            +
            ext/libxml/ruby_xml_dtd.c
         
     | 
| 
      
 17 
     | 
    
         
            +
            ext/libxml/ruby_xml_dtd.h
         
     | 
| 
      
 18 
     | 
    
         
            +
            ext/libxml/ruby_xml_encoding.c
         
     | 
| 
      
 19 
     | 
    
         
            +
            ext/libxml/ruby_xml_encoding.h
         
     | 
| 
      
 20 
     | 
    
         
            +
            ext/libxml/ruby_xml_error.c
         
     | 
| 
      
 21 
     | 
    
         
            +
            ext/libxml/ruby_xml_error.h
         
     | 
| 
      
 22 
     | 
    
         
            +
            ext/libxml/ruby_xml_html_parser.c
         
     | 
| 
      
 23 
     | 
    
         
            +
            ext/libxml/ruby_xml_html_parser.h
         
     | 
| 
      
 24 
     | 
    
         
            +
            ext/libxml/ruby_xml_html_parser_context.c
         
     | 
| 
      
 25 
     | 
    
         
            +
            ext/libxml/ruby_xml_html_parser_context.h
         
     | 
| 
      
 26 
     | 
    
         
            +
            ext/libxml/ruby_xml_html_parser_options.c
         
     | 
| 
      
 27 
     | 
    
         
            +
            ext/libxml/ruby_xml_html_parser_options.h
         
     | 
| 
      
 28 
     | 
    
         
            +
            ext/libxml/ruby_xml_input_cbg.c
         
     | 
| 
      
 29 
     | 
    
         
            +
            ext/libxml/ruby_xml_input_cbg.h
         
     | 
| 
      
 30 
     | 
    
         
            +
            ext/libxml/ruby_xml_io.c
         
     | 
| 
      
 31 
     | 
    
         
            +
            ext/libxml/ruby_xml_io.h
         
     | 
| 
      
 32 
     | 
    
         
            +
            ext/libxml/ruby_xml_namespace.c
         
     | 
| 
      
 33 
     | 
    
         
            +
            ext/libxml/ruby_xml_namespace.h
         
     | 
| 
      
 34 
     | 
    
         
            +
            ext/libxml/ruby_xml_namespaces.c
         
     | 
| 
      
 35 
     | 
    
         
            +
            ext/libxml/ruby_xml_namespaces.h
         
     | 
| 
      
 36 
     | 
    
         
            +
            ext/libxml/ruby_xml_node.c
         
     | 
| 
      
 37 
     | 
    
         
            +
            ext/libxml/ruby_xml_node.h
         
     | 
| 
      
 38 
     | 
    
         
            +
            ext/libxml/ruby_xml_parser.c
         
     | 
| 
      
 39 
     | 
    
         
            +
            ext/libxml/ruby_xml_parser.h
         
     | 
| 
      
 40 
     | 
    
         
            +
            ext/libxml/ruby_xml_parser_context.c
         
     | 
| 
      
 41 
     | 
    
         
            +
            ext/libxml/ruby_xml_parser_context.h
         
     | 
| 
      
 42 
     | 
    
         
            +
            ext/libxml/ruby_xml_parser_options.c
         
     | 
| 
      
 43 
     | 
    
         
            +
            ext/libxml/ruby_xml_parser_options.h
         
     | 
| 
      
 44 
     | 
    
         
            +
            ext/libxml/ruby_xml_reader.c
         
     | 
| 
      
 45 
     | 
    
         
            +
            ext/libxml/ruby_xml_reader.h
         
     | 
| 
      
 46 
     | 
    
         
            +
            ext/libxml/ruby_xml_relaxng.c
         
     | 
| 
      
 47 
     | 
    
         
            +
            ext/libxml/ruby_xml_relaxng.h
         
     | 
| 
      
 48 
     | 
    
         
            +
            ext/libxml/ruby_xml_sax2_handler.c
         
     | 
| 
      
 49 
     | 
    
         
            +
            ext/libxml/ruby_xml_sax2_handler.h
         
     | 
| 
      
 50 
     | 
    
         
            +
            ext/libxml/ruby_xml_sax_parser.c
         
     | 
| 
      
 51 
     | 
    
         
            +
            ext/libxml/ruby_xml_sax_parser.h
         
     | 
| 
      
 52 
     | 
    
         
            +
            ext/libxml/ruby_xml_schema.c
         
     | 
| 
      
 53 
     | 
    
         
            +
            ext/libxml/ruby_xml_schema.h
         
     | 
| 
      
 54 
     | 
    
         
            +
            ext/libxml/ruby_xml_version.h
         
     | 
| 
      
 55 
     | 
    
         
            +
            ext/libxml/ruby_xml_xinclude.c
         
     | 
| 
      
 56 
     | 
    
         
            +
            ext/libxml/ruby_xml_xinclude.h
         
     | 
| 
      
 57 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpath.c
         
     | 
| 
      
 58 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpath.h
         
     | 
| 
      
 59 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpath_context.c
         
     | 
| 
      
 60 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpath_context.h
         
     | 
| 
      
 61 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpath_expression.c
         
     | 
| 
      
 62 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpath_expression.h
         
     | 
| 
      
 63 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpath_object.c
         
     | 
| 
      
 64 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpath_object.h
         
     | 
| 
      
 65 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpointer.c
         
     | 
| 
      
 66 
     | 
    
         
            +
            ext/libxml/ruby_xml_xpointer.h
         
     | 
| 
      
 67 
     | 
    
         
            +
            ext/mingw/Rakefile
         
     | 
| 
      
 68 
     | 
    
         
            +
            ext/mingw/build.rake
         
     | 
| 
      
 69 
     | 
    
         
            +
            ext/mingw/libiconv-2.dll
         
     | 
| 
      
 70 
     | 
    
         
            +
            ext/mingw/libxml2-2.dll
         
     | 
| 
      
 71 
     | 
    
         
            +
            ext/mingw/libxml_ruby.dll.a
         
     | 
| 
      
 72 
     | 
    
         
            +
            ext/mingw/libxml_ruby.so
         
     | 
| 
      
 73 
     | 
    
         
            +
            ext/vc/libxml_ruby.sln
         
     | 
| 
      
 74 
     | 
    
         
            +
            ext/vc/libxml_ruby_18/libxml_ruby.vcproj
         
     | 
| 
      
 75 
     | 
    
         
            +
            ext/vc/libxml_ruby_19/libxml_ruby_19.vcproj
         
     | 
| 
      
 76 
     | 
    
         
            +
            doc/.htaccess
         
     | 
| 
      
 77 
     | 
    
         
            +
            doc/.rsync-filter
         
     | 
| 
      
 78 
     | 
    
         
            +
            lib/libxml/attr.rb
         
     | 
| 
      
 79 
     | 
    
         
            +
            lib/libxml/attr_decl.rb
         
     | 
| 
      
 80 
     | 
    
         
            +
            lib/libxml/attributes.rb
         
     | 
| 
      
 81 
     | 
    
         
            +
            lib/libxml/document.rb
         
     | 
| 
      
 82 
     | 
    
         
            +
            lib/libxml/error.rb
         
     | 
| 
      
 83 
     | 
    
         
            +
            lib/libxml/hpricot.rb
         
     | 
| 
      
 84 
     | 
    
         
            +
            lib/libxml/html_parser.rb
         
     | 
| 
      
 85 
     | 
    
         
            +
            lib/libxml/namespace.rb
         
     | 
| 
      
 86 
     | 
    
         
            +
            lib/libxml/namespaces.rb
         
     | 
| 
      
 87 
     | 
    
         
            +
            lib/libxml/node.rb
         
     | 
| 
      
 88 
     | 
    
         
            +
            lib/libxml/ns.rb
         
     | 
| 
      
 89 
     | 
    
         
            +
            lib/libxml/parser.rb
         
     | 
| 
      
 90 
     | 
    
         
            +
            lib/libxml/properties.rb
         
     | 
| 
      
 91 
     | 
    
         
            +
            lib/libxml/reader.rb
         
     | 
| 
      
 92 
     | 
    
         
            +
            lib/libxml/sax_callbacks.rb
         
     | 
| 
      
 93 
     | 
    
         
            +
            lib/libxml/sax_parser.rb
         
     | 
| 
      
 94 
     | 
    
         
            +
            lib/libxml/tree.rb
         
     | 
| 
      
 95 
     | 
    
         
            +
            lib/libxml/xpath_object.rb
         
     | 
| 
      
 96 
     | 
    
         
            +
            lib/libxml.rb
         
     | 
| 
      
 97 
     | 
    
         
            +
            lib/xml/libxml.rb
         
     | 
| 
      
 98 
     | 
    
         
            +
            lib/xml.rb
         
     | 
| 
      
 99 
     | 
    
         
            +
            script/benchmark/depixelate
         
     | 
| 
      
 100 
     | 
    
         
            +
            script/benchmark/hamlet.xml
         
     | 
| 
      
 101 
     | 
    
         
            +
            script/benchmark/parsecount
         
     | 
| 
      
 102 
     | 
    
         
            +
            script/benchmark/sock_entries.xml
         
     | 
| 
      
 103 
     | 
    
         
            +
            script/benchmark/throughput
         
     | 
| 
      
 104 
     | 
    
         
            +
            script/test
         
     | 
| 
      
 105 
     | 
    
         
            +
            test/etc_doc_to_s.rb
         
     | 
| 
      
 106 
     | 
    
         
            +
            test/ets_doc_file.rb
         
     | 
| 
      
 107 
     | 
    
         
            +
            test/ets_doc_to_s.rb
         
     | 
| 
      
 108 
     | 
    
         
            +
            test/ets_gpx.rb
         
     | 
| 
      
 109 
     | 
    
         
            +
            test/ets_node_gc.rb
         
     | 
| 
      
 110 
     | 
    
         
            +
            test/ets_test.xml
         
     | 
| 
      
 111 
     | 
    
         
            +
            test/ets_tsr.rb
         
     | 
| 
      
 112 
     | 
    
         
            +
            test/model/atom.xml
         
     | 
| 
      
 113 
     | 
    
         
            +
            test/model/bands.xml
         
     | 
| 
      
 114 
     | 
    
         
            +
            test/model/books.xml
         
     | 
| 
      
 115 
     | 
    
         
            +
            test/model/merge_bug_data.xml
         
     | 
| 
      
 116 
     | 
    
         
            +
            test/model/ruby-lang.html
         
     | 
| 
      
 117 
     | 
    
         
            +
            test/model/rubynet.xml
         
     | 
| 
      
 118 
     | 
    
         
            +
            test/model/rubynet_project
         
     | 
| 
      
 119 
     | 
    
         
            +
            test/model/shiporder.rnc
         
     | 
| 
      
 120 
     | 
    
         
            +
            test/model/shiporder.rng
         
     | 
| 
      
 121 
     | 
    
         
            +
            test/model/shiporder.xml
         
     | 
| 
      
 122 
     | 
    
         
            +
            test/model/shiporder.xsd
         
     | 
| 
      
 123 
     | 
    
         
            +
            test/model/soap.xml
         
     | 
| 
      
 124 
     | 
    
         
            +
            test/model/xinclude.xml
         
     | 
| 
      
 125 
     | 
    
         
            +
            test/tc_attr.rb
         
     | 
| 
      
 126 
     | 
    
         
            +
            test/tc_attr_decl.rb
         
     | 
| 
      
 127 
     | 
    
         
            +
            test/tc_attributes.rb
         
     | 
| 
      
 128 
     | 
    
         
            +
            test/tc_deprecated_require.rb
         
     | 
| 
      
 129 
     | 
    
         
            +
            test/tc_document.rb
         
     | 
| 
      
 130 
     | 
    
         
            +
            test/tc_document_write.rb
         
     | 
| 
      
 131 
     | 
    
         
            +
            test/tc_dtd.rb
         
     | 
| 
      
 132 
     | 
    
         
            +
            test/tc_error.rb
         
     | 
| 
      
 133 
     | 
    
         
            +
            test/tc_html_parser.rb
         
     | 
| 
      
 134 
     | 
    
         
            +
            test/tc_namespace.rb
         
     | 
| 
      
 135 
     | 
    
         
            +
            test/tc_namespaces.rb
         
     | 
| 
      
 136 
     | 
    
         
            +
            test/tc_node.rb
         
     | 
| 
      
 137 
     | 
    
         
            +
            test/tc_node_cdata.rb
         
     | 
| 
      
 138 
     | 
    
         
            +
            test/tc_node_comment.rb
         
     | 
| 
      
 139 
     | 
    
         
            +
            test/tc_node_copy.rb
         
     | 
| 
      
 140 
     | 
    
         
            +
            test/tc_node_edit.rb
         
     | 
| 
      
 141 
     | 
    
         
            +
            test/tc_node_pi.rb
         
     | 
| 
      
 142 
     | 
    
         
            +
            test/tc_node_text.rb
         
     | 
| 
      
 143 
     | 
    
         
            +
            test/tc_node_write.rb
         
     | 
| 
      
 144 
     | 
    
         
            +
            test/tc_node_xlink.rb
         
     | 
| 
      
 145 
     | 
    
         
            +
            test/tc_parser.rb
         
     | 
| 
      
 146 
     | 
    
         
            +
            test/tc_parser_context.rb
         
     | 
| 
      
 147 
     | 
    
         
            +
            test/tc_properties.rb
         
     | 
| 
      
 148 
     | 
    
         
            +
            test/tc_reader.rb
         
     | 
| 
      
 149 
     | 
    
         
            +
            test/tc_relaxng.rb
         
     | 
| 
      
 150 
     | 
    
         
            +
            test/tc_sax_parser.rb
         
     | 
| 
      
 151 
     | 
    
         
            +
            test/tc_schema.rb
         
     | 
| 
      
 152 
     | 
    
         
            +
            test/tc_traversal.rb
         
     | 
| 
      
 153 
     | 
    
         
            +
            test/tc_xinclude.rb
         
     | 
| 
      
 154 
     | 
    
         
            +
            test/tc_xml.rb
         
     | 
| 
      
 155 
     | 
    
         
            +
            test/tc_xpath.rb
         
     | 
| 
      
 156 
     | 
    
         
            +
            test/tc_xpath_context.rb
         
     | 
| 
      
 157 
     | 
    
         
            +
            test/tc_xpath_expression.rb
         
     | 
| 
      
 158 
     | 
    
         
            +
            test/tc_xpointer.rb
         
     | 
| 
      
 159 
     | 
    
         
            +
            test/test_suite.rb
         
     | 
| 
      
 160 
     | 
    
         
            +
            Rakefile
         
     | 
| 
      
 161 
     | 
    
         
            +
            HISTORY.rdoc
         
     | 
| 
      
 162 
     | 
    
         
            +
            PROFILE
         
     | 
| 
      
 163 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 164 
     | 
    
         
            +
            LICENSE
         
     | 
| 
      
 165 
     | 
    
         
            +
            README.rdoc
         
     | 
| 
      
 166 
     | 
    
         
            +
            VERSION
         
     | 
    
        data/README.rdoc
    CHANGED
    
    | 
         @@ -1,184 +1,188 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            = LibXML Ruby
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            == Overview
         
     | 
| 
       4 
     | 
    
         
            -
            The libxml gem provides Ruby language bindings for GNOME's Libxml2
         
     | 
| 
       5 
     | 
    
         
            -
            XML toolkit. It is free software, released under the MIT License.
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            We think libxml-ruby is the best XML library for Ruby because:
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            * Speed - Its much faster than REXML and Hpricot
         
     | 
| 
       10 
     | 
    
         
            -
            * Features - It provides an amazing number of featues
         
     | 
| 
       11 
     | 
    
         
            -
            * Conformance - It passes all 1800+ tests from the OASIS XML Tests Suite
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            == Requirements
         
     | 
| 
       14 
     | 
    
         
            -
            libxml-ruby requires Ruby 1.8.4 or higher.  It  
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            * libm      (math routines: very standard)
         
     | 
| 
       18 
     | 
    
         
            -
            * libz      (zlib)
         
     | 
| 
       19 
     | 
    
         
            -
            * libiconv
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
            == INSTALLATION
         
     | 
| 
       28 
     | 
    
         
            -
            The easiest way to install libxml-ruby is via Ruby Gems.  To install:
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
            <tt>gem install libxml-ruby</tt>
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
            If you are running Windows,  
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
            extensions are built using MinGW64 and libxml2 version 2.9.3,
         
     | 
| 
       35 
     | 
    
         
            -
            iconv version 1.14 and zlib version 1.2.8. 
     | 
| 
       36 
     | 
    
         
            -
            are available in the lib\libs directory.  To use them, put them
         
     | 
| 
       37 
     | 
    
         
            -
            someplace on your path.
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
            The gem also includes a Microsoft VC++ 2012 solution  
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
            *  
     | 
| 
       48 
     | 
    
         
            -
            *  
     | 
| 
       49 
     | 
    
         
            -
            *  
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
            *  
     | 
| 
       72 
     | 
    
         
            -
            *  
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
               
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
               
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
               
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
       133 
     | 
    
         
            -
             
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
            ==  
     | 
| 
       144 
     | 
    
         
            -
             
     | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
             
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
       150 
     | 
    
         
            -
             
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
              
     | 
| 
       154 
     | 
    
         
            -
             
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
             
     | 
| 
       158 
     | 
    
         
            -
             
     | 
| 
       159 
     | 
    
         
            -
             
     | 
| 
       160 
     | 
    
         
            -
             
     | 
| 
       161 
     | 
    
         
            -
              
     | 
| 
       162 
     | 
    
         
            -
              
     | 
| 
       163 
     | 
    
         
            -
             
     | 
| 
       164 
     | 
    
         
            -
             
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
             
     | 
| 
       167 
     | 
    
         
            -
             
     | 
| 
       168 
     | 
    
         
            -
             
     | 
| 
       169 
     | 
    
         
            -
             
     | 
| 
       170 
     | 
    
         
            -
             
     | 
| 
       171 
     | 
    
         
            -
             
     | 
| 
       172 
     | 
    
         
            -
             
     | 
| 
       173 
     | 
    
         
            -
             
     | 
| 
       174 
     | 
    
         
            -
             
     | 
| 
       175 
     | 
    
         
            -
             
     | 
| 
       176 
     | 
    
         
            -
            ruby 
     | 
| 
       177 
     | 
    
         
            -
             
     | 
| 
       178 
     | 
    
         
            -
             
     | 
| 
       179 
     | 
    
         
            -
             
     | 
| 
       180 
     | 
    
         
            -
             
     | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
             
     | 
| 
       184 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            = LibXML Ruby
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            == Overview
         
     | 
| 
      
 4 
     | 
    
         
            +
            The libxml gem provides Ruby language bindings for GNOME's Libxml2
         
     | 
| 
      
 5 
     | 
    
         
            +
            XML toolkit. It is free software, released under the MIT License.
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            We think libxml-ruby is the best XML library for Ruby because:
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            * Speed - Its much faster than REXML and Hpricot
         
     | 
| 
      
 10 
     | 
    
         
            +
            * Features - It provides an amazing number of featues
         
     | 
| 
      
 11 
     | 
    
         
            +
            * Conformance - It passes all 1800+ tests from the OASIS XML Tests Suite
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            == Requirements
         
     | 
| 
      
 14 
     | 
    
         
            +
            libxml-ruby requires Ruby 1.8.4 or higher.  It depends on libxml2 to
         
     | 
| 
      
 15 
     | 
    
         
            +
            function propoerly.  libxml2, in turn, depends on:
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            * libm      (math routines: very standard)
         
     | 
| 
      
 18 
     | 
    
         
            +
            * libz      (zlib)
         
     | 
| 
      
 19 
     | 
    
         
            +
            * libiconv
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            If you are running Linux or Unix you'll need a C compiler so the
         
     | 
| 
      
 22 
     | 
    
         
            +
            extension can be compiled when it is installed.  If you are running
         
     | 
| 
      
 23 
     | 
    
         
            +
            Windows, then install the x64-mingw32 gem or build it yourself using
         
     | 
| 
      
 24 
     | 
    
         
            +
            Devkit (http://rubyinstaller.org/add-ons/devkit/) or
         
     | 
| 
      
 25 
     | 
    
         
            +
            msys2 (https://msys2.github.io/).
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            == INSTALLATION
         
     | 
| 
      
 28 
     | 
    
         
            +
            The easiest way to install libxml-ruby is via Ruby Gems.  To install:
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            <tt>gem install libxml-ruby</tt>
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            If you are running Windows, then install the libxml-ruby-x64-mingw32 gem.
         
     | 
| 
      
 33 
     | 
    
         
            +
            THe gem inncludes prebuilt extensions for Ruby 2.3.  These
         
     | 
| 
      
 34 
     | 
    
         
            +
            extensions are built using MinGW64 and libxml2 version 2.9.3,
         
     | 
| 
      
 35 
     | 
    
         
            +
            iconv version 1.14 and zlib version 1.2.8. Note these binaries
         
     | 
| 
      
 36 
     | 
    
         
            +
            are available in the lib\libs directory.  To use them, put them
         
     | 
| 
      
 37 
     | 
    
         
            +
            someplace on your path.
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            The gem also includes a Microsoft VC++ 2012 solution and XCode 5 project - these
         
     | 
| 
      
 40 
     | 
    
         
            +
            are very useful for debugging.
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            libxml-ruby's source codes lives on Github at https://github.com/xml4r/libxml-ruby.
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
            == Getting Started
         
     | 
| 
      
 45 
     | 
    
         
            +
            Using libxml is easy. First decide what parser you want to use:
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            * Generally you'll want to use the LibXML::XML::Parser which provides a tree based API.
         
     | 
| 
      
 48 
     | 
    
         
            +
            * For larger documents that don't fit into memory, or if you prefer an input based API, use the LibXML::XML::Reader.
         
     | 
| 
      
 49 
     | 
    
         
            +
            * To parse HTML files use LibXML::XML::HTMLParser.
         
     | 
| 
      
 50 
     | 
    
         
            +
            * If you are masochistic, then use the LibXML::XML::SaxParser, which provides a callback API.
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
            Once you have chosen a parser, choose a datasource.  Libxml can parse files, strings, URIs
         
     | 
| 
      
 53 
     | 
    
         
            +
            and IO streams.  For each data source you can specify an LibXML::XML::Encoding, a base uri and
         
     | 
| 
      
 54 
     | 
    
         
            +
            various parser options.  For more information, refer the LibXML::XML::Parser.document,
         
     | 
| 
      
 55 
     | 
    
         
            +
            LibXML::XML::Parser.file, LibXML::XML::Parser.io or LibXML:::XML::Parser.string methods (the
         
     | 
| 
      
 56 
     | 
    
         
            +
            same methods are defined on all four parser classes).
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
            == Advanced Functionality
         
     | 
| 
      
 59 
     | 
    
         
            +
            Beyond the basics of parsing and processing XML and HTML documents,
         
     | 
| 
      
 60 
     | 
    
         
            +
            libxml provides a wealth of additional functionality.
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
            Most commonly, you'll want to use its LibXML::XML::XPath support, which makes
         
     | 
| 
      
 63 
     | 
    
         
            +
            it easy to find data inside a XML document.  Although not as popular,
         
     | 
| 
      
 64 
     | 
    
         
            +
            LibXML::XML::XPointer provides another API for finding data inside an XML document.
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
            Often times you'll need to validate data before processing it. For example,
         
     | 
| 
      
 67 
     | 
    
         
            +
            if you accept user generated content submitted over the Web, you'll
         
     | 
| 
      
 68 
     | 
    
         
            +
            want to verify that it does not contain malicious code such as embedded scripts.
         
     | 
| 
      
 69 
     | 
    
         
            +
            This can be done using libxml's powerful set of validators:
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
            * DTDs (LibXML::XML::Dtd)
         
     | 
| 
      
 72 
     | 
    
         
            +
            * Relax Schemas (LibXML::XML::RelaxNG)
         
     | 
| 
      
 73 
     | 
    
         
            +
            * XML Schema (LibXML::XML::Schema)
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
            Finally, if you'd like to use XSL Transformations to process data,
         
     | 
| 
      
 76 
     | 
    
         
            +
            then install the libxslt gem which is available at
         
     | 
| 
      
 77 
     | 
    
         
            +
            https://github.com/xml4r/libxslt-ruby.
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
            == Usage
         
     | 
| 
      
 80 
     | 
    
         
            +
            For information about using libxml-ruby please refer to its documentation at
         
     | 
| 
      
 81 
     | 
    
         
            +
            http://xml4r.github.com/libxml-ruby/rdoc/index.html. Some tutorials are also
         
     | 
| 
      
 82 
     | 
    
         
            +
            available at https://github.com/xml4r/libxml-ruby/wiki.
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
            All libxml classes are in the LibXML::XML module. The easiest
         
     | 
| 
      
 85 
     | 
    
         
            +
            way to use libxml is to require 'xml'.  This will mixin
         
     | 
| 
      
 86 
     | 
    
         
            +
            the LibXML module into the global namespace, allowing you to
         
     | 
| 
      
 87 
     | 
    
         
            +
            write code like this:
         
     | 
| 
      
 88 
     | 
    
         
            +
             
     | 
| 
      
 89 
     | 
    
         
            +
              require 'xml'
         
     | 
| 
      
 90 
     | 
    
         
            +
              document = XML::Document.new
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
            However, when creating an application or library you plan to
         
     | 
| 
      
 93 
     | 
    
         
            +
            redistribute, it is best to not add the LibXML module to the global
         
     | 
| 
      
 94 
     | 
    
         
            +
            namespace, in which case you can either write your code like this:
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
              require 'libxml'
         
     | 
| 
      
 97 
     | 
    
         
            +
              document = LibXML::XML::Document.new
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
            Or you can utilize a namespace for your own work and include LibXML into it.
         
     | 
| 
      
 100 
     | 
    
         
            +
            For example:
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
              require 'libxml'
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
              module MyApplication
         
     | 
| 
      
 105 
     | 
    
         
            +
                include LibXML
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
                class MyClass
         
     | 
| 
      
 108 
     | 
    
         
            +
                  def some_method
         
     | 
| 
      
 109 
     | 
    
         
            +
                    document = XML::Document.new
         
     | 
| 
      
 110 
     | 
    
         
            +
                  end
         
     | 
| 
      
 111 
     | 
    
         
            +
                end
         
     | 
| 
      
 112 
     | 
    
         
            +
              end
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
            For simplicity's sake, the documentation uses the xml module in its examples.
         
     | 
| 
      
 115 
     | 
    
         
            +
             
     | 
| 
      
 116 
     | 
    
         
            +
            == Threading
         
     | 
| 
      
 117 
     | 
    
         
            +
            libxml-ruby fully supports native, background Ruby threads.  This of course
         
     | 
| 
      
 118 
     | 
    
         
            +
            only applies to Ruby 1.9.x and higher since earlier versions of Ruby do not
         
     | 
| 
      
 119 
     | 
    
         
            +
            support native threads.
         
     | 
| 
      
 120 
     | 
    
         
            +
             
     | 
| 
      
 121 
     | 
    
         
            +
            == Performance
         
     | 
| 
      
 122 
     | 
    
         
            +
            In addition to being feature rich and conformation, the main reason
         
     | 
| 
      
 123 
     | 
    
         
            +
            people use libxml-ruby is for performance.  Here are the results 
         
     | 
| 
      
 124 
     | 
    
         
            +
            of a couple simple benchmarks recently blogged about on the
         
     | 
| 
      
 125 
     | 
    
         
            +
            Web (you can find them in the benchmark directory of the 
         
     | 
| 
      
 126 
     | 
    
         
            +
            libxml distribution).
         
     | 
| 
      
 127 
     | 
    
         
            +
             
     | 
| 
      
 128 
     | 
    
         
            +
            From http://depixelate.com/2008/4/23/ruby-xml-parsing-benchmarks
         
     | 
| 
      
 129 
     | 
    
         
            +
             
     | 
| 
      
 130 
     | 
    
         
            +
                           user     system      total        real
         
     | 
| 
      
 131 
     | 
    
         
            +
             libxml    0.032000   0.000000   0.032000 (  0.031000)
         
     | 
| 
      
 132 
     | 
    
         
            +
             Hpricot   0.640000   0.031000   0.671000 (  0.890000)
         
     | 
| 
      
 133 
     | 
    
         
            +
             REXML     1.813000   0.047000   1.860000 (  2.031000)
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
            From https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/
         
     | 
| 
      
 136 
     | 
    
         
            +
             
     | 
| 
      
 137 
     | 
    
         
            +
                           user     system      total        real
         
     | 
| 
      
 138 
     | 
    
         
            +
             libxml    0.641000   0.031000   0.672000 (  0.672000)
         
     | 
| 
      
 139 
     | 
    
         
            +
             hpricot   5.359000   0.062000   5.421000 (  5.516000)
         
     | 
| 
      
 140 
     | 
    
         
            +
             rexml    22.859000   0.047000  22.906000 ( 23.203000) 
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
      
 142 
     | 
    
         
            +
             
     | 
| 
      
 143 
     | 
    
         
            +
            == Documentation
         
     | 
| 
      
 144 
     | 
    
         
            +
            Documentation is available via rdoc, and is installed automatically with the
         
     | 
| 
      
 145 
     | 
    
         
            +
            gem.
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
            libxml-ruby's online documentation is generated using Hanna, which is a
         
     | 
| 
      
 148 
     | 
    
         
            +
            development gem dependency.
         
     | 
| 
      
 149 
     | 
    
         
            +
             
     | 
| 
      
 150 
     | 
    
         
            +
            Note that older versions of Rdoc, which ship with Ruby 1.8.x, will report
         
     | 
| 
      
 151 
     | 
    
         
            +
            a number of errors.  To avoid them, install Rdoc 2.1 or higher.  Once you have
         
     | 
| 
      
 152 
     | 
    
         
            +
            installed the gem, you'll have to disable the version of Rdoc that Ruby 1.8.x
         
     | 
| 
      
 153 
     | 
    
         
            +
            includes.  An easy way to do that is rename the directory ruby/lib/ruby/1.8/rdoc to
         
     | 
| 
      
 154 
     | 
    
         
            +
            ruby/lib/ruby/1.8/rdoc_old.
         
     | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
      
 156 
     | 
    
         
            +
            == Support
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
            If you have any questions about using libxml-ruby, please report them to
         
     | 
| 
      
 159 
     | 
    
         
            +
            Git Hub at https://github.com/xml4r/libxml-ruby/issues
         
     | 
| 
      
 160 
     | 
    
         
            +
             
     | 
| 
      
 161 
     | 
    
         
            +
            == Memory Management
         
     | 
| 
      
 162 
     | 
    
         
            +
            libxml-ruby automatically manages memory associated with the
         
     | 
| 
      
 163 
     | 
    
         
            +
            underlying libxml2 library.  The bindings create a one-to-one mapping between
         
     | 
| 
      
 164 
     | 
    
         
            +
            ruby objects and libxml documents and libxml parent nodes (ie, nodes that do not
         
     | 
| 
      
 165 
     | 
    
         
            +
            have a parent and do not belong to a document). In these cases,
         
     | 
| 
      
 166 
     | 
    
         
            +
            the bindings manage the memory.  They do this by installing a free
         
     | 
| 
      
 167 
     | 
    
         
            +
            function and storing a back pointer to the Ruby object from the xmlnode
         
     | 
| 
      
 168 
     | 
    
         
            +
            using the _private member on libxml structures.  When the Ruby object
         
     | 
| 
      
 169 
     | 
    
         
            +
            goes out of scope, the underlying libxml structure is freed.  Libxml
         
     | 
| 
      
 170 
     | 
    
         
            +
            itself then frees all child node (recursively).
         
     | 
| 
      
 171 
     | 
    
         
            +
             
     | 
| 
      
 172 
     | 
    
         
            +
            For all other nodes (the vast majority), the bindings create temporary
         
     | 
| 
      
 173 
     | 
    
         
            +
            Ruby objects that get freed once they go out of scope. Thus there can be
         
     | 
| 
      
 174 
     | 
    
         
            +
            more than one ruby object pointing to the same xml node. To mostly hide
         
     | 
| 
      
 175 
     | 
    
         
            +
            this from programmers on the ruby side, the #eql? and #== methods are
         
     | 
| 
      
 176 
     | 
    
         
            +
            overriden to check if two ruby objects wrap the same xmlnode.  If they do,
         
     | 
| 
      
 177 
     | 
    
         
            +
            then the methods return true.  During the mark phase, each of these temporary
         
     | 
| 
      
 178 
     | 
    
         
            +
            objects marks its owning document, thereby keeping the Ruby document object
         
     | 
| 
      
 179 
     | 
    
         
            +
            alive and thus the xmldoc tree.
         
     | 
| 
      
 180 
     | 
    
         
            +
             
     | 
| 
      
 181 
     | 
    
         
            +
            In the sweep phase of the garbage collector, or when a program ends,
         
     | 
| 
      
 182 
     | 
    
         
            +
            there is no order to how Ruby objects are freed. In fact, the ruby document
         
     | 
| 
      
 183 
     | 
    
         
            +
            object is almost always freed before any ruby objects that wrap child nodes.
         
     | 
| 
      
 184 
     | 
    
         
            +
            However, this is ok because those ruby objects do not have a free function
         
     | 
| 
      
 185 
     | 
    
         
            +
            and are no longer in scope (since if they were the document would not be freed).
         
     | 
| 
      
 186 
     | 
    
         
            +
             
     | 
| 
      
 187 
     | 
    
         
            +
            == License
         
     | 
| 
      
 188 
     | 
    
         
            +
            See LICENSE for license information.
         
     |