Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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)