This library can be used to parse, or generate ONIX files from a list of books metadatas.
var onix = require("onix");
var xml = onix.create({
from: {
company: "GitBook",
person: "Samy Pesse",
email: "samy@gitbook.com"
},
suplier: {
name: "ePubDirect",
availabilityCode: "IP"
},
products: [
{
record: "gitbook.com-bookId",
notification: onix.codes.NOTIFICATION.ADVANCE,
id: {
type: onix.codes.PRODUCTID.ISBN13,
value: '978123456789'
},
title: "My Awesome Book",
language: "eng",
prices: [
{
amount: 6,
currency: 'eur'
},
5
]
}
]
});