feeder
Introduction
This project is a simple xml to json converter for the most common types of ecommerce product feeds.
Dependencies
Usage
var FeedStream = fs = ; fs ;
Options
newlines
-Boolean
print each product on a new linetrim
-Boolean
trim element textblacklist
-Array
blacklist keys from being emittedrename
-Object
rename keys e.g.{"before": "after"}
lowercaseKeys
-Boolean
lower case keysproductElement
-String
element name to mark the start and end of a product. Usually 'product' or some variation thereofextractAttrs
-Boolean
extract all element attributes into emitted objects
Example
FeedStream
accepts xml of approximately the following format:
Wintermute 2000.00 CHF Neuromancer 100000.00 BRL
and produces a stringified JSON object for each product:
name: 'Wintermute' price: '2000.00' currency: 'CHF' name: 'Neuromancer' price: '100000.00' currency: 'BRL'
License
MIT