Socket
Socket
Sign inDemoInstall

ubl-builder

Package Overview
Dependencies
4
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ubl-builder

Tool to create xml documents with UBL 2.0 standard


Version published
Weekly downloads
171
increased by98.84%
Maintainers
1
Install size
1.13 MB
Created
Weekly downloads
 

Readme

Source

Ubl-builder

license

A library to create XML documents with UBL 2.1 (Universal Business Language) standard.

Online demo: https://ubl-builder-react-demo.stackblitz.io/

Ubl 2.1 documentation: http://docs.oasis-open.org/ubl/os-UBL-2.1/UBL-2.1.html Ubl 2.1 Schema documents: http://www.datypic.com/sc/ubl21/ss.html

Install:

npm install ubl-builder

Samples

How to create a Basic Document
// import { Invoice } from 'ubl-builder';
const { Invoice } = require("ubl-builder");

const invoice = new Invoice('123456789', {});
invoice.addProperty('xmlns', 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2');
console.log(invoice.getXml());
Output
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Invoice
    xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
    <cbc:UBLVersionID>UBL 2.1</cbc:UBLVersionID>
    <cbc:ID>123456789</cbc:ID>
    <cbc:IssueDate>2020-09-13</cbc:IssueDate>
    <cbc:IssueTime>02:10:44-05:00</cbc:IssueTime>
</Invoice>

Keywords

FAQs

Last updated on 16 Aug 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc