v-xml-tree

Vue.js 3.0 XML tree viewer component

Usage no npm install needed!

<script type="module">
  import vXmlTree from 'https://cdn.skypack.dev/v-xml-tree';
</script>

README

vue-xml-tree

Vue.js 3.0 XML tree viewer component

GitHub release license

vue-xml-tree

Vue.js 3.0 XML tree viewer

Installation

With npm:

npm i v-xml-tree --save

With a CDN:

<!-- In <body>, after Vue import -->
<script type="text/javascript" src="https://unpkg.com/v-xml-tree/dist/vXmlTree.umd.js"></script>

Usage

With an ES6 bundler (via npm)

In your component file

import vXmlTree from "v-xml-tree";

Then register:

components: {
    vXmlTree
  },

With a CDN

<script>
    Vue.component("v-xml-tree", vXmlTree);

    new Vue({
        // ...
    })
</script>

Props:

  • data <Object/Array> - Data to format into tree
  • filterKey - String to filter data
  • fullMarkup - If full mark up is need (quotes and commas)

Slots:

  • hide - What should be used for the hide button
  • expand - What should be used for the expand button
  • more - What should be used for the elipsis when an object/array is hidden