commerceml-js
A sax-style parser for CommerceMl (1C).
Last updated 2 years ago by kirill-zhirnov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install commerceml-js 
SYNC missed versions from official npm registry.

What is it?

A sax-style parser for CommerceMl (1C).

Install

npm install commerceml-js

How to use?


var fs = require('fs');
var commerceMl = require('commerceml-js');

var stream = commerceMl.createStream('import');

stream.on('commercialInfo', function(data) {
    console.log('commercialInfo:', data);
});

stream.on('classifier', function(data) {
    console.log('classifier', data);
});

stream.on('classifierGroup', function(data) {
    console.log('classifierGroup', data);
});

stream.on('classifierProperty', function(data) {
    console.log('classifierProperty', data);
});

stream.on('catalog', function(data) {
    console.log('catalog', data);
});

stream.on('product', function(data) {
    console.log('product', data);
});

stream.on('packageOffers', function(data) {
    console.log('packageOffers', data);
});

stream.on('offer', function(data) {
    console.log('offer', data);
});

stream.on("error", function(error) {
    console.log('error', error);
});

fs.createReadStream("./data/import.xml").pipe(stream);

Methods

createStream(<type>), where type can be:

  • "import" - if you are parsing import.xml file.

  • "offers" - if you are parsing offers.xml file.

Current Tags

  • 0.0.9                                ...           latest (2 years ago)

9 Versions

  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 4
Dependencies (4)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |