Socket
Socket
Sign inDemoInstall

react-xml

Package Overview
Dependencies
4
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-xml

<img src="https://img.shields.io/travis/dnalborczyk/r


Version published
Weekly downloads
9
increased by80%
Maintainers
1
Install size
30.1 kB
Created
Weekly downloads
 

Readme

Source

react-xml

install

npm i react-xml

usage

import react from 'react'
import renderToStaticXML from 'react-xml'

const id = 'E0000001'
const name = 'John Smith'

const element = (
  <emp:employee xmlns:emp="urn:corp:emp">
    <emp:person work:empId={id} xmlns:work="urn:corp:work">
      <emp:name>{name}</emp:name>
    </emp:person>
  </emp:employee>
)

const xml = renderToStaticXML(element)

console.log(xml)

// <emp:employee xmlns:emp="urn:corp:emp">
//   <emp:person work:empId="E0000001" xmlns:work="urn:corp:work">
//     <emp:name>John Smith</emp:name>
//   </emp:person>
// </emp:employee>

Keywords

FAQs

Last updated on 22 Dec 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc