0.1.8 • Published 6 months ago

frixml v0.1.8

Weekly downloads
-
License
MIT OR BSL-1.0
Repository
github
Last release
6 months ago

frixml - Fricky Fast XML

This is a maintained fork of rapidx2j, with some changes detailed next.

Node.JS module for converting XML documents into JSON objects. \ It is one of the fastest converters available (benchmarks next). Uses RapidXML.

Installation

npm install --save frixml

Usage

frixml.parse(xml_string[, options]);

Options

OptionDescriptiontypedefault
group_attrsGroup attributes under attr_prefix dictbooleanfalse
attr_prefixPrefix attributes with this textstring@
empty_tag_valueSets the value for empty tagsstring | undefined""
parse_boolean_valuesParses boolean values in the XML contentbooleantrue
parse_int_valuesParses integer numbers in the XML contentbooleantrue
parse_float_valuesParses floating-point numbers in the XML contentbooleantrue
ignore_attrIgnores attributes in the XML contentbooleanfalse
preserve_casePreserves the case of tag and attribute namesbooleantrue
explicit_arrayForces arrays to be used for repeated elementsbooleanfalse
value_keySpecifies the key to use for the value of a tagstring""

Examples

const frixml = require('frixml');
const json = frixml.parse(xml_string);
console.log(json);

Fork changes

  • Support for comments parsing
  • Modified empty attr value to empty string ""
  • Remove skip_parse_when_begins_with - didn't see use for it
  • Migrated to typescript

License & copyright

RapidXml license is provided at LICENSE.RapidXml. \ Original license it provided in repo at LICENSE.

0.1.8

6 months ago

0.1.7

6 months ago

0.1.6

7 months ago

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago