{"id":18522673,"url":"https://github.com/astro/libxml-ruby","last_synced_at":"2026-01-21T08:38:23.515Z","repository":{"id":436264,"uuid":"57281","full_name":"astro/libxml-ruby","owner":"astro","description":"Make LibXML-Ruby's SAX parser a SAX push parser","archived":false,"fork":false,"pushed_at":"2009-01-25T16:10:58.000Z","size":7200,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-26T00:09:31.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://libxml.rubyforge.org/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astro.png","metadata":{"files":{"readme":"README","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-09-28T14:46:51.000Z","updated_at":"2019-08-13T13:36:31.000Z","dependencies_parsed_at":"2022-07-04T16:09:21.112Z","dependency_job_id":null,"html_url":"https://github.com/astro/libxml-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro%2Flibxml-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro%2Flibxml-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro%2Flibxml-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro%2Flibxml-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astro","download_url":"https://codeload.github.com/astro/libxml-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239238141,"owners_count":19605230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T17:32:36.971Z","updated_at":"2026-01-21T08:38:23.472Z","avatar_url":"https://github.com/astro.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"= LibXML Ruby\n\n== Overview\nThe libxml gem provides Ruby language bindings for GNOME's Libxml2\nXML toolkit. It is free software, released under the MIT License.\n\nWe think libxml-ruby is the best XML library for Ruby because:\n\n* Speed - Its much faster than REXML and Hpricot\n* Features - It provides an amazing number of featues\n* Conformance - It passes all 1800+ tests from the OASIS XML Tests Suite\n\n== Requirements\nlibxml-ruby requires Ruby 1.8.4 or higher.  It is dependent on \nthe following libraries to function properly:\n\n* libm      (math routines: very standard)\n* libz      (zlib)\n* libiconv\n* libxml2\n\nIf you are running Linux or Unix you'll need a C compiler so the\nextension can be compiled when it is installed.  If you are running\nWindows, then install the Windows specific RubyGem which\nincludes an already built extension.\n\n== INSTALLATION\nThe easiest way to install libxml-ruby is via Ruby Gems.  To install:\n\n\u003ctt\u003egem install libxml-ruby\u003c/tt\u003e\n\nIf you are running Windows, make sure to install the Win32 RubyGem\nwhich includes an already built binary file.  The binary is built\nagainst libxml2 version 2.7.2 and iconv version 1.11.  Both of these\nare also included as pre-built binaries, and should be put either in\nthe libxml/lib directory or on the Windows path.  Due to a bug\nin ruby-gems, you cannot install the gem to a path that contains\nspaces (see http://rubyforge.org/tracker/?func=detail\u0026aid=23003\u0026group_id=126\u0026atid=577).\n\nThe Windows binaries are built with MingW and include libxml-ruby, \nlibxml2 and iconv.  The gem also includes a Microsoft VC++ 2008\nsolution.  If you wish to run a debug version of libxml-ruby on\nWindows, then it is highly recommended you use VC++.\n\n== Getting Started\nUsing libxml is easy. First decide what parser you want to use.\nGenerally you'll want to use the LibXML::XML::Parser which provides a tree based API.\nFor larger documents that don't fit into memory, or if you prefer an input based API,\nthen use LibXML::XML::Reader. If you are parsing HTML files, then use LibXML::XML::HTMLParser.\nFinally, if you are masochistic, then use the LibXML::XML::SaxParser, which provides a callback API.\n\nOnce you choose a parser, then choose a datasource and its\nencoding.  Libxml can parse files, strings, URIs and IO stream.\nFor more information, see LibXML::XML::Input.\n\n== Advanced Functionality\nBeyond the basics of parsing and processing XML and HTML documents,\nlLibxml provides a wealth of additional functionality.\n\nMost commonly, you'll want to use its LibXML::XML::XPath support, which makes\nit easy to search for data inside and XML document.  Although not as\npopular, LibXML::XML::XPointer provides another API for finding data inside\nan XML document.\n\nOften times you'll need to validate data before processing it. For example,\nif you accept user generated content submitted over the Web, you'll\nwant to first verify it does not contain malicious code such as embedded scripts.\nThis can be done using libxml's powerful set of validators:\n\n* DTDs (LibXML::XML::Dtd)\n* Relax Schemas (LibXML::XML::RelaxNG)\n* XML Schema (LibXML::XML::Schema)\n\nFinally, if you'd like to use XSL Transformations to process data,\nthen also install the libxslt gem which is available at\nhttp://rubyforge.org/projects/libxsl/.\n\n== Usage\nFor in-depth information about using libxml-ruby please refer\nto its online Rdoc documentation.\n\nAll libxml classes are in the LibXML::XML module. The easiest\nway to use libxml is to require 'xml'.  This will mixin\nthe LibXML module into the global namespace, allowing you to\nwrite code like this:\n\n  require 'xml'\n  document = XML::Document.new\n\nHowever, when creating an application or library you plan to\nredistribute, it is best to not add the LibXML module to the global\nnamespace, in which case you can either write your code like this:\n\n  require 'libxml'\n  document = LibXML::XML::Document.new\n\nor, more conveniently, utilize a proper namespace for you own work\nand include LibXML into it. For example:\n\n  require 'libxml'\n\n  mdoule MyApplication\n    include LibXML\n\n    class MyClass\n      def some_method\n        document = XML::Document.new\n      end\n    end\n  end\n\nFor simplicity's sake, the documentation uses the xml module in its examples.\n\n== Performance\nIn addition to being feature rich and conformation, the main reason\npeople use libxml-ruby is for performance.  Here are the results \nof a couple simple benchmarks recently blogged about on the\nWeb (you can find them in the benchmark directory of the \nlibxml distribution).\n\nFrom http://depixelate.com/2008/4/23/ruby-xml-parsing-benchmarks\n\n               user     system      total        real\n libxml    0.032000   0.000000   0.032000 (  0.031000)\n Hpricot   0.640000   0.031000   0.671000 (  0.890000)\n REXML     1.813000   0.047000   1.860000 (  2.031000)\n\nFrom https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/\n\n               user     system      total        real\n libxml    0.641000   0.031000   0.672000 (  0.672000)\n hpricot   5.359000   0.062000   5.421000 (  5.516000)\n rexml    22.859000   0.047000  22.906000 ( 23.203000) \n\n\n== DOCUMENTATION\nFor more information please refer to the documentation.\n\nRDoc comments are included - run 'rake doc' to generate documentation.\nYou can find the latest documentation at:\n\n* http://libxml.rubyforge.org/rdoc/\n\nIf you have any questions, please send email to libxml-devel@rubyforge.org.\n\n== License\nSee LICENSE for license information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastro%2Flibxml-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastro%2Flibxml-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastro%2Flibxml-ruby/lists"}