You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ubl-builder

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ubl-builder

Tool to create xml documents with UBL 2.0 standard

1.3.1
latest
Source
npmnpm
Version published
Weekly downloads
17
-46.87%
Maintainers
1
Weekly downloads
 
Created
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

ubl2

FAQs

Package last updated on 16 Aug 2022

Did you know?

Socket

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