Project

mysql-xml

0.0
No commit activity in last 3 years
No release in over 3 years
Provides a simple, fast way of parsing XML dumps of MySQL data, uses the REXML stream parser making it suitable for use on datasets of arbitrary length.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

MySQL XML¶ ↑

About¶ ↑

Provides an easy way to parse XML output from mysql -X. MySQLXML::parse takes an IO object for the XML and a block that gets called once for each record. The records are represented as hashes keyed by string representations of column names.

Example:

MySQLXML::parse(File.new('test.xml')) do |record|
  puts record['username']
end

This uses REXML’s stream parser, so it should be reasonably memory efficient.

Install¶ ↑

From Gemcutter

gem install mysql-xml