New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ngx-xml2json

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-xml2json

Angular library for converting XML to JSON. Tested on Angular 6

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

ngx-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 = `<note><to>User</to><from>Library</from><heading>Message</heading><body>Some XML to convert to JSON!</body></note>`;
  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);

  }

}

Author

Steven Fernandez

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Changelog

[1.0.0] - 2018-05-12

Added

  • First Commit - xml2json conversion

[1.0.1] - 2018-05-12

Added

  • Code and readme tidy

[1.0.2] - 2018-05-12

Added

  • Updated package.json

Keywords

xml to json

FAQs

Package last updated on 12 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts