Angular library for converting XML to JSON. Tested on Angular 6
npm install ngx-xml2jsonngx-xml2json
============
Angular Library to convert XML data to JSON.
Tested on Angular 6.
Install
=======
```
npm install ngx-xml2json --save
Usage Example:
==============
`
import { Component } from '@angular/core';
import { NgxXml2jsonService } from 'ngx-xml2json';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
xml = ;
constructor(private ngxXml2jsonService: NgxXml2jsonService) {
const parser = new DOMParser();
const xml = parser.parseFromString(this.xml, 'text/xml');
const obj = this.ngxXml2jsonService.xmlToJson(xml);
console.log(obj);
}
}
``
Steven Fernandez
This project is licensed under the MIT License - see the LICENSE.md file for details
Changelog
=========