Xml layout from input stream

Hi,
I want to save and restore my layouts using the XML format. Is there a reason there isn’t a method to read the xml file from an inputStream, like there is for the binary format?

My link to the layout file is a URL, as opposed to a File, because the resource will be stored on the classpath in a jar file.

I can get it to work using the File readXML version, but it takes a bit of contortions.

Yes, I did not want to write ten different read-methods :slight_smile:

But you can use the class bibliothek.util.xml.XIO to read an XElement from an InputStream. You can give this XElement to the second readXML method.

XElement element = XIO.readUTF( in );
in.close();
CControl control = ...
control.readXML( element );```