Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    crackpublic

    Crack

    [![Build Status] status] travis

    Really simple XML parsing with libxmljs libxmljs.

    Installation

    npm install crack

    Usage

    crack = require 'crack'
     
    data = '<?xml version="1.0" encoding="UTF-8"?>' +
           '<Items>' +
           '<Item>' +
           '<ASIN>0816614024</ASIN>' +
           '<ItemAttributes>' +
           '<Creator Role="Author">Gilles Deleuze</Creator>' +
           '<Creator Role="Contributor">Felix Guattari</Creator>' +
           '<Title>Thousand Plateaus</Title>' +
           '</ItemAttributes>' +
           '</Item>' +
           '</Items>'
    doc = crack data
     
    # Convert entire document to a JavaScript object. 
    console.dir doc.toJS()
     
    # Drop down to a node. 
    doc.find 'Creator'(creator) ->
      console.dir creator

    Keywords

    none

    install

    npm i crack

    Downloadsweekly downloads

    217

    version

    0.0.2

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar