vue-xml-viewer
v0.1.4
Published
The component to display formatted and colored XML document view.
Downloads
405
Readme
vue-xml-viewer
The component to display formatted and colored XML document view.
Live demo
https://leon737.github.io/vue-xml-viewer/
Setup
npm install vue-xml-viewer --save
Your project should use Composition API
Install:
npm install @vue/composition-api
Setup Composition API:
Add to your app entry js file:
import Vue from 'vue'
import CompositionApi from '@vue/composition-api'
Vue.use(CompositionApi)
Usage
<template>
<div>
<XmlViewer :xml="xml" />
</div>
</template>
import XmlViewer from 'vue-xml-viewer'
export default {
components: {
XmlViewer
},
setup() {
const xml = getSomeXmlAsString()
return {
xml
}
}
}