Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including pojo2xml with all npm packages installed. Try it out:

var pojo2xml = require("pojo2xml")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

pojo2xml v1.7.2

Convert plain old javascript objects (POJOs) to XML. Fast.

pojo2xml

Convert Javascript objects to XML strings. Fast.

Installation

npm

npm install pojo2xml

yarn

yarn add pojo2xml

Usage

var pojo2xml = require('pojo2xml');
var xmlString = pojo2xml(yourJavascriptObjectHere);

Not currently supported

  • XML declaration (e.g. <?xml version="1.0"?>)
  • an explicit root node - if the root JS object has more than one property, multiple root elements will be included in the XML
  • CDATA
  • XML attributes

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free