Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpacer/display_xml
package for distributing a ipython compatible XML displayer
https://github.com/mpacer/display_xml
Last synced: about 1 month ago
JSON representation
package for distributing a ipython compatible XML displayer
- Host: GitHub
- URL: https://github.com/mpacer/display_xml
- Owner: mpacer
- Created: 2018-01-22T02:52:12.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-14T07:14:57.000Z (over 4 years ago)
- Last Synced: 2024-12-20T05:36:04.202Z (about 1 month ago)
- Language: Python
- Size: 256 KB
- Stars: 10
- Watchers: 3
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# display_xml
package for distributing a ipython compatible XML displayer# To install
```
pip install -U display_xml
```# To use
Import `XML` from `display_xml`.
Call `XML` passing in the object you want to convert in as an argument.```python
from display_xml import XML
XML('content')
```![single xml example](./images/single_display_xml_screenshot.jpg)
You can pass in:
- `str`
- `bytes`
- `lxml.etree._Element`
- `lxml.etree._ElementTree`## To display all available styles
```python
from display_xml import XML
XML.display_all_styles('content')
```![multiple style xml example](./images/multi_display_xml_screenshot.jpg)
Once you know the style you want, pass that string in as an argument to `XML`:
```python
from display_xml import XML
XML('content', style='perldoc')
```![styled single xml example](./images/styled_single_xml_screenshot.png)