Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

embulk-parser-xml2

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embulk-parser-xml2

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Xml2 parser plugin for Embulk

Embulk parser plugin for parsing xml data. this plugin uses SAX parser, so you can parse very huge XML data with this plugin. also, support parsing sub-element under the root element which you specified. so you can parse and expand data more flexibly.

Overview

  • Plugin type: parser
  • Guess supported: no

Configuration

  • type: specify this plugin as "xml2" (string, required)
  • root: root element to start fetching each entries (integer, required)
  • schema: specify the attribute of table and data type (required)

Example

parser:
  type: xml2
  root: mediawiki/page
  schema:
    - { name: id, type: long }
    - { name: title, type: string }
    - { name: revision/timestamp, type: timestamp, format: '%Y-%m-%dT%H:%M:%SZ' }
    - { name: revision/text, type: string }

Then you can fetch entries from the following xml (wikipedia archive xml format.) :

<mediawiki>
  <page>
    <id>1</id>
    <title>title 1</title>
    <revision>
      <timestamp>2004-04-30T14:46:00Z</timestamp>
      <text>body text</text>
    </revision>
  </page>
  <page>
    <id>2</id>
    <title>title 2</title>
    <revision>
      <timestamp>2004-04-30T14:46:00Z</timestamp>
      <text>body text</text>
    </revision>
  </page>
</mediawiki>

Build

$ ./gradlew gem  

How to send Pull Request

If you would like to send a patch or Pull Request to this repository, please agree with our CLA before that. Please check following steps.

  1. You send Pull Request to our Yahoo! JAPAN OSS.
  2. We send you CLA to get agreement from you.
  • Yahoo! JAPAN CLA https://gist.github.com/ydnjp/3095832f100d5c3d2592
  1. You agree with the CLA.
  2. We review your Pull Request and merge it.

FAQs

Package last updated on 12 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc