Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

xpath-object-transform

📌 DEPRECATED: Please use camaro instead.

A npm module to convert xml document to json based on a JSON template.

XML is noisy and a pain to deal with. I just want to work with JSON.

Motivation

Most of the xml to JSON libraries will convert the complete xml document to a complete JSON object but in my use cases, I don't really want that. I just want certain attributes.

Ideally, I just want to write a template specifies how to transform it and get the result. Hence this package.

Installation

npm install xpath-object-transform --save

Usage

var transform = require('xpath-object-transform')

var result = transform(xml, template)

TODO

  • Update documentation
  • Add test unit
  • Add more examples
  • Add benchmarks

About

Transform an object literal using xpath.

Topics

Resources

License

Releases

No releases published

Packages

No packages published