Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 942 Bytes

README.md

File metadata and controls

45 lines (31 loc) · 942 Bytes

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.

from display_xml import XML
XML('<body><tag>content</tag></body>')

single xml example

You can pass in:

  • str
  • bytes
  • lxml.etree._Element
  • lxml.etree._ElementTree

To display all available styles

from display_xml import XML
XML.display_all_styles('<body><tag>content</tag></body>')

multiple style xml example

Once you know the style you want, pass that string in as an argument to XML:

from display_xml import XML
XML('<body><tag>content</tag></body>', style='perldoc')

styled single xml example