https://github.com/miquido/xml-viewer
The project was made by Miquido. https://www.miquido.com/
https://github.com/miquido/xml-viewer
Last synced: 21 days ago
JSON representation
The project was made by Miquido. https://www.miquido.com/
- Host: GitHub
- URL: https://github.com/miquido/xml-viewer
- Owner: miquido
- License: mit
- Created: 2020-03-10T13:50:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T14:26:05.000Z (over 6 years ago)
- Last Synced: 2025-02-23T03:42:22.288Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```