All Projects → oozcitak → Xmlbuilder Js

oozcitak / Xmlbuilder Js

Licence: mit
An XML builder for node.js

Programming Languages

javascript
184084 projects - #8 most used programming language
coffeescript
4710 projects

Projects that are alternatives of or similar to Xmlbuilder Js

Fhir.js
Node.JS library for serializing/deserializing FHIR resources between JS/JSON and XML using various node.js XML libraries
Stars: ✭ 61 (-92.76%)
Mutual labels:  xml, node-js
Xmlbuilder2
An XML builder for node.js
Stars: ✭ 143 (-83.04%)
Mutual labels:  xml, node-js
Node Xml2js
XML to JavaScript object converter.
Stars: ✭ 4,402 (+422.18%)
Mutual labels:  xml, node-js
Retrofit2samples
Retrofit2 Samples 与 Nodejs 服务端接口
Stars: ✭ 16 (-98.1%)
Mutual labels:  node-js
Calc
Unit Testing in JavaScript
Stars: ✭ 17 (-97.98%)
Mutual labels:  node-js
Unofficial Masakapahariini Api
Book recipes api bahasa Indonesia 🇮🇩 🥗
Stars: ✭ 24 (-97.15%)
Mutual labels:  node-js
Worker Threads Nodejs
Benchmark nodeJS worker threads for calculating prime numbers, using various dataStructures
Stars: ✭ 27 (-96.8%)
Mutual labels:  node-js
Cardinalpgm Maps
Make OCN Great Again!
Stars: ✭ 6 (-99.29%)
Mutual labels:  xml
Chatapp
Chat App with all functionality private chat, contacts, friends request, find friends,for profile settings image cropper functionality, settings, logout also send text, image and all type of files, delete your files for you and everyone , login with email and mobile number and real time database firebase and for notification purpose Node Js used.
Stars: ✭ 25 (-97.03%)
Mutual labels:  node-js
Cheatyxml
CheatyXML is a Swift framework designed to manage XML easily
Stars: ✭ 23 (-97.27%)
Mutual labels:  xml
Xylophone
Xylophone
Stars: ✭ 23 (-97.27%)
Mutual labels:  xml
Fuzi
A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
Stars: ✭ 894 (+6.05%)
Mutual labels:  xml
Music Player
Android xml template layout for media/music player.
Stars: ✭ 24 (-97.15%)
Mutual labels:  xml
Xml Comp
Compare ANY markup documents.
Stars: ✭ 16 (-98.1%)
Mutual labels:  xml
Draggablelayout
Draggable XML Layout for Android
Stars: ✭ 26 (-96.92%)
Mutual labels:  xml
Easyxml
Simplifies parsing and modifying of (huge) XML streams (files) based on the StAX parser with combination of JAXB or JDom2
Stars: ✭ 6 (-99.29%)
Mutual labels:  xml
Csound Api
Node.js bindings to Csound’s API
Stars: ✭ 25 (-97.03%)
Mutual labels:  node-js
Amazon Mobile Sentiment Analysis
Opinion mining of Mobile reviews on Amazon platform
Stars: ✭ 19 (-97.75%)
Mutual labels:  xml
Vast Parser
Recursively requests and parses VAST chains into a single JavaScript object.
Stars: ✭ 18 (-97.86%)
Mutual labels:  xml
Snowflake
❄️ SVG in Swift
Stars: ✭ 924 (+9.61%)
Mutual labels:  xml

xmlbuilder-js

An XML builder for node.js similar to java-xmlbuilder.

License NPM Version NPM Downloads

Travis Build Status AppVeyor Build status Dev Dependency Status Code Coverage

Announcing xmlbuilder2:

The new release of xmlbuilder is available at xmlbuilder2! xmlbuilder2 has been redesigned from the ground up to be fully conforming to the modern DOM specification. It supports XML namespaces, provides built-in converters for multiple formats, collection functions, and more. Please see upgrading from xmlbuilder in the wiki.

New development will be focused towards xmlbuilder2; xmlbuilder will only receive critical bug fixes.

Installation:

npm install xmlbuilder

Usage:

var builder = require('xmlbuilder');

var xml = builder.create('root')
  .ele('xmlbuilder')
    .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
  .end({ pretty: true});

console.log(xml);

will result in:

<?xml version="1.0"?>
<root>
  <xmlbuilder>
    <repo type="git">git://github.com/oozcitak/xmlbuilder-js.git</repo>
  </xmlbuilder>
</root>

It is also possible to convert objects into nodes:

var builder = require('xmlbuilder');

var obj = {
  root: {
    xmlbuilder: {
      repo: {
        '@type': 'git', // attributes start with @
        '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node
      }
    }
  }
};

var xml = builder.create(obj).end({ pretty: true});
console.log(xml);

If you need to do some processing:

var builder = require('xmlbuilder');

var root = builder.create('squares');
root.com('f(x) = x^2');
for(var i = 1; i <= 5; i++)
{
  var item = root.ele('data');
  item.att('x', i);
  item.att('y', i * i);
}

var xml = root.end({ pretty: true});
console.log(xml);

This will result in:

<?xml version="1.0"?>
<squares>
  <!-- f(x) = x^2 -->
  <data x="1" y="1"/>
  <data x="2" y="4"/>
  <data x="3" y="9"/>
  <data x="4" y="16"/>
  <data x="5" y="25"/>
</squares>

Documentation:

See the wiki for details and examples for more complex examples.

Donations:

Please consider becoming a backer or sponsor to help support development.

Donate Button

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].