Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miquido/xml-viewer

The project was made by Miquido. https://www.miquido.com/
https://github.com/miquido/xml-viewer

Last synced: 20 days ago
JSON representation

The project was made by Miquido. https://www.miquido.com/

Awesome Lists containing this project

README

        

# xml-viewer

Render and preview XML file in browser.

## Features:

- Pure JavaScript
- Ultra light
- Ultra fast
- Possibility to add custom styles
- Showing/hiding nodes
- Showing/hiding all children nodes by clicking '+'/'-' with pressed 'alt' button
- Line numbers display

## Configuration

```javascript
new xmlViewerPlugin(containerId, url, numberOfNodesToShow, searchInputId);
```

**containerId** - id of the HTML element where XML preview should be appended

**url** - path to XML file to preview

**numberOfNodesToShow** - number of nodes that will be expanded at initialization

**searchInputId** - search input id (optional)

## Example usage

```javascript
new xmlViewerPlugin('foo', 'data/example.xml', 3, , 'search-input');
```

## Initialization

```sh
npm start
```

## Build

```sh
npm build
```