I’m developping a tool with Python which stores XML data in block description.
I know how to set or get a string in my block description but I am more confused with XML part (convert a string into a XML element in order to read or modify it).
Do you have any advice or example on the XML lib I could use and how to use it ?
I have tried the following :
import xml.etree.ElementTree as etree
import rhinoscriptsyntax as rs
blockId = rs.GetObject(“Block ?”,rs.filter.instance)
blockName = rs.BlockInstanceName(blockId)
blockDescription = rs.BlockDescription(blockName)
XMLDescription = etree.fromstring(blockDescription)
But I get this error message :
Message: No module named expat; use SimpleXMLTreeBuilder instead
Any thoughts ?