# ubl-builder2

> Tool to create xml documents with UBL 2.0 standard

Latest version **1.1.2** (published 2021-03-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install ubl-builder2
pnpm add ubl-builder2
yarn add ubl-builder2
bun add ubl-builder2
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2021-03-26 |
| First published | 2021-03-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 504.4 KB |
| Known vulnerabilities | 0 (+17 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Felipe Santa |
| Maintainers | yigitaltintas |
| Keywords | ubl2, UBL, 2.1, xml |

## Links

- npm: https://www.npmjs.com/package/ubl-builder2
- Repository: https://github.com/pipesanta/ubl-builder
- Homepage: https://github.com/yigitaltintas/ubl-builder#readme
- Issues: https://github.com/pipesanta/ubl-builder/issues
- npm.io page: https://npm.io/package/ubl-builder2

## Dependencies (4)

- [xpath](https://npm.io/package/xpath.md) 0.0.29
- [xmldom](https://npm.io/package/xmldom.md) ^0.3.0
- [weeknumber](https://npm.io/package/weeknumber.md) ^1.1.2
- [xmlbuilder](https://npm.io/package/xmlbuilder.md) ^15.1.1

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2021-03-26
- 1.1.1 — 2021-03-26
- 1.1.0 — 2021-03-26

## README

# Ubl-builder

[![license](https://img.shields.io/npm/l/xmldom?color=blue&style=flat-square)](./LICENSE.md)


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>

Install:
-------
> npm install ubl-builder

## Samples

##### How to create a Basic Document
```js
// 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
<?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>
```

---
_Source: https://npm.io/package/ubl-builder2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
