js-global-xml

0.1.0 • Public • Published

js-global-xml

Version

Universal XML API for Nodejs, Browsers and Google Apps Script

Install

nodejs
npm install js-global-xml
cdn
<script src="https://alex2844.github.io/js-global-xml/dist/globalXml.js"></script>

Usage

const XML = require('js-global-xml');
const xmlStr = `<?xml version="1.0" encoding="utf-8"?>
<recipe name="хлеб" preptime="5min" cooktime="180min">
   <title>Простой хлеб</title>
   <composition>
      <ingredient amount="3" unit="стакан">Мука</ingredient>
      <ingredient amount="0.25" unit="грамм">Дрожжи</ingredient>
      <ingredient amount="1.5" unit="стакан">Тёплая вода</ingredient>
   </composition>
   <instructions>
     <step>Смешать все ингредиенты и тщательно замесить.</step>
     <step>Закрыть тканью и оставить на один час в тёплом помещении.</step>
     <step>Замесить ещё раз, положить на противень и поставить в духовку.</step>
   </instructions>
</recipe>`;
console.log(XML.parse(xmlStr));

Readme

Keywords

none

Package Sidebar

Install

npm i js-global-xml

Weekly Downloads

0

Version

0.1.0

License

none

Unpacked Size

5.88 kB

Total Files

5

Last publish

Collaborators

  • alex2844