https://github.com/awesome-panel/panel-xml
An XML widget for interactively exploring XML in Python notebooks and Panel data apps.
https://github.com/awesome-panel/panel-xml
List: panel-xml
data-app data-visualization holoviz-panel notebook python xml
Last synced: 4 months ago
JSON representation
An XML widget for interactively exploring XML in Python notebooks and Panel data apps.
- Host: GitHub
- URL: https://github.com/awesome-panel/panel-xml
- Owner: awesome-panel
- Created: 2024-10-24T18:31:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:46:22.000Z (over 1 year ago)
- Last Synced: 2025-11-01T06:02:07.046Z (7 months ago)
- Topics: data-app, data-visualization, holoviz-panel, notebook, python, xml
- Language: Python
- Homepage: https://awesome-panel.org
- Size: 8.21 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ✨ panel-xml
[](https://opensource.org/licenses/MIT)
[](https://py.cafe/awesome.panel.org/panel-xml-basic)
`panel-xml` provides the `XML` *pane* to display and explore XML in notebooks and [Panel](https://panel.holoviz.org/) data apps.

It is based on [react-xml-viewer](https://github.com/alissonmbr/react-xml-viewer).
## Key Features
- **Configurable Depth**: Set an initial collapsible depth for better navigation.
- **Collapse/Expand Tags**: Intuitively collapse or expand tags to streamline XML exploration.
- **Customizable Theme**: Configure the colors and appearance with a customizable theme.
## Installation
You can install `panel-xml` using `pip`:
```bash
pip install panel-xml
```
## Usage
### Basic XML Pane
[](https://py.cafe/awesome.panel.org/panel-xml-basic)
[](https://py.cafe/awesome.panel.org/panel-xml-editor)
Here’s how to create a simple XML pane using the `XML` widget:
```python
import panel as pn
from panel_xml import XML
pn.extension()
xml = '''
- Hello
- World
'''
XML(xml, depth=2).servable()
```
## Api
### Parameters
- `object` (str): The XML string to display in a prettified format.
- `indent_size` (int): The size of the indentation.
- `collapsible` (bool): Enable collapsing/expanding tags. When collapsed, content and attributes are hidden.
- `depth` (int): When `collapsible` is set to `True`, this defines the initial collapsed depth. Set it to `0` for fully collapsed, or `-1` for fully expanded.
- `theme` (dict): A dictionary to customize the theme. See the [react-xml-viewer theme documentation](https://github.com/alissonmbr/react-xml-viewer#theme-object) for details.
## XML Editor
[](https://py.cafe/awesome.panel.org/panel-xml-editor)
[Open the XML Editor](https://py.cafe/awesome.panel.org/panel-xml-editor) to explore the features and documentation of the `XML` pane interactively.
[](https://py.cafe/awesome.panel.org/panel-xml-editor)
## ❤️ Contributions
Contributions and co-maintainers are very welcome! Please submit issues or pull requests to the [GitHub repository](https://github.com/awesome-panel/panel-xml). Check out the [DEVELOPER_GUIDE](DEVELOPER_GUIDE.md) for more information.
## Alternatives
- [Panel CodeEditor](https://panel.holoviz.org/reference/widgets/CodeEditor.html): Displays XML nicely if `language="xml"`.
----
Start using `panel-xml` to integrate rich, interactive XML displays directly into your Python applications!