Skip to content
No description or website provided.
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
LICENSE.md
README.md
index.js
package.json

README.md

xml-entities

Stupidly simple XML 1.0 entity encoder/decoder

Overview

XML 1.0 defines 5 standard entities - ", ', &, <, and >. I define a few more - \t, \n, and \r. This module encodes/decodes them.

Installation

Available via npm:

$ npm install xml-entities

Or via git:

$ git clone git://github.com/deoxxa/xml-entities.git node_modules/xml-entities

Usage

var xmlentities = require("xml-entities");

var str = "<a>lol</a>";
console.log(str);

str = xmlentities.encode(str);
console.log(str);

str = xmlentities.decode(str);
console.log(str);

License

3-clause BSD. A copy is included with the source.

Contact

Something went wrong with that request. Please try again.