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

embulk-parser-flexml

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-flexml

  • 0.2.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

embulk-parser-flexml

Parser plugin for Embulk.

Flexible xml parser for embulk. read data using xpath and from attributes

  • Plugin type: parser
  • Load all or nothing: yes
  • Resume supported: no

Configuration

  • type: specify this plugin as flexml .
  • root: root property to start fetching each entries, specify in path/to/node style (string, required)
  • schema: specify the attribute of table and data type (required)
    • name: name of the attribute (string, required)
    • type: type of the attribute (string, required)
    • attribute: if specified, value of this attribute will be the output, otherwise child will be the output (string, optional)
    • xpath: child element to select (string, required)
    • format: timestamp format to parse (string, required)
    • timezone: timestamp will be parsed in this timezone (string, optional)

Example

Configuration

parser:
    type: flexml
    root: Team/Players/Player
    schema:
        - { name: name, type: string, attribute: name }
        - { name: age, type: long, attribute: age }
        - { name: about, type: string, xpath: About }
        - { name: facebook, type: string, xpath: "SocialMedia[@type='facebook']", attribute: url }
        - { name: twitter, type: string, xpath: "SocialMedia[@type='twitter']", attribute: url }

XML

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Team>
    <Players>
        <Player name="Locatelli" age="23">
            <About>
                Manuel Locatelli Cavaliere OMRI (born 8 January 1998) is an Italian professional footballer who plays as a midfielder for Serie A club Juventus, on loan from Serie A club Sassuolo, and the Italy national team.
            </About>
            <SocialMedia type="facebook" url="https://www.facebook.com/locamanuel73"/>
            <SocialMedia type="twitter" url="https://twitter.com/locamanuel73"/>
        </Player>
    </Players>
</Team>

FAQs

Package last updated on 17 Dec 2021

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