Convert code made by @CellKai in a method ```python dbf = DocumentBuilderFactory.newInstance() db = dbf.newDocumentBuilder() dom = db.parse(xml_file) experimentEL = dom.getDocumentElement() nodeList = dom.getElementsByTagName("Attributes") for i in range(nodeList.getLength()): node = nodeList.item(i).getAttributes().getNamedItem("name").getNodeValue() if node == "channel": nbr_chnl = int(nodeList.item(i).getElementsByTagName("Channel").getLength()) if node == "illumination": nbr_ill = int(nodeList.item(i).getElementsByTagName("Illumination").getLength()) timepoints_node = dom.getElementsByTagName("Timepoints") nbr_tp = ( int(timepoints_node.item(0).getElementsByTagName("last").item(0).getTextContent()) + 1 ) ```
Activity
ehrenfeu commentedon Jan 19, 2026
Actually...
Is this really a method for the
bdvmodule? Shouldn't it rather be inbioformats...?lguerard commentedon Jan 19, 2026
This is to read the XML file created by the H5/XML library using BigStitcher, so it wouldn't make sense to put it in
bioformatsIMO.ehrenfeu commentedon Jan 19, 2026
Okay, then we'll leave it here.