Re: Save owl rdf/xml to string without writing to disk

Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/Save-owl-rdf-xml-to-string-without-writing-to-disk-tp1875p1912.html

Hi,

When calling save(), you can pass a BytesIO object instead of a file or a file name, e.g.

from io import *

f = BytesIO()
onto.save(f)
print(f.getvalue())

Jiba